naiba and cloudcode
05e14981b5
fix(security): verify transfer-token HMAC and sign CSRF double-submit cookie
...
- consumeTransferToken now recomputes and constant-time compares the
entry's HMAC-SHA256; previously the signature was minted but never
checked, so the documented "防篡改" guarantee was hollow and security
rested solely on the sync.Map key's randomness.
- CSRF switches from a raw-random double-submit cookie to a signed token
(nonce.HMAC-SHA256 keyed by JWTSecretKey). The middleware now also
validates the signature, defeating sibling-subdomain cookie tossing
where a naive header==cookie pair would otherwise pass.
Co-authored-by: cloudcode <cloudcode@users.noreply.github.com >
2026-05-31 05:48:50 +00:00
..
2025-12-04 21:52:12 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-26 03:59:50 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 05:48:50 +00:00
2026-05-31 05:48:50 +00:00
2026-05-31 05:48:50 +00:00
2025-03-19 21:52:16 +08:00
2026-05-30 15:56:44 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-17 10:24:19 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 05:48:50 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 05:48:50 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 02:04:35 +00:00
2026-05-17 10:24:19 +08:00
2026-01-10 17:29:10 +08:00
2026-05-31 05:48:50 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 02:04:35 +00:00
2026-05-31 02:04:35 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-26 03:51:05 +00:00
2025-01-04 20:49:14 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00