yetone
bad05e1b79
redact: sk- and a UUID in lower case is a key again
...
3e96197da left an sk- value unmasked when it had no capital and no run
of 16 between hyphens, so an SK hynix article's address is not a key.
A key that is sk- and a UUID in lower case (groups of 8, 4, 4, 4 and 12
hex digits) met both and went to the vendor as written. A value that is
hex digits alone after sk- is masked again; no slug of words is.
Run on mote at this tree: go test ./internal/redact ok. TestSlugIsNoKey
with the UUID case is red on 3e96197da's rule ("0 masked"). The SK hynix
addresses stay unmasked.
Not run: the full suite.
2026-10-28 11:23:46 +08:00
..
2026-10-27 14:10:33 +08:00
2026-10-22 04:07:55 +08:00
2026-10-22 10:52:04 +08:00
2026-10-25 03:53:35 +08:00
2026-10-27 22:44:52 +08:00
2026-10-27 22:44:52 +08:00
2026-10-25 16:47:29 +08:00
2026-10-13 14:14:59 +08:00
2026-10-27 17:10:20 +08:00
2026-10-23 18:01:26 +08:00
2026-10-27 02:01:17 +08:00
2026-10-27 14:10:33 +08:00
2026-10-25 17:44:52 +08:00
2026-10-21 19:38:31 +08:00
2026-10-26 15:06:01 +08:00
2026-10-24 21:00:05 +08:00
2026-10-21 06:12:37 +08:00
2026-10-27 15:42:08 +08:00
2026-10-27 15:42:08 +08:00
2026-10-25 15:35:52 +08:00
2026-10-09 11:56:10 +08:00
2026-10-25 15:35:52 +08:00
2026-10-04 23:30:56 +08:00
2026-10-27 14:10:33 +08:00
2026-10-27 14:10:33 +08:00
2026-10-26 22:16:02 +08:00
2026-10-21 19:13:49 +08:00
2026-10-26 10:57:18 +08:00
2026-10-26 10:57:18 +08:00
2026-10-24 19:41:02 +08:00
2026-10-27 11:26:54 +08:00
2026-10-28 11:23:46 +08:00
2026-10-15 23:08:05 +08:00
2026-10-05 12:42:42 +08:00
2026-10-22 04:07:55 +08:00
2026-10-18 02:49:19 +08:00
gateway: a request archive, off unless turned on, keeps each call's headers and bodies in the user's own S3 bucket and a recent call reads its own back (Jorben on Discord: 请求存档) — the Gateway page's recent calls only ever held the last bodies in memory, the first 256 KB of each, with no headers, gone at a restart. A switch over Recent calls ("Request archive", POST /api/settings/archive, settings' requestArchive) turns it on, refused with a reason while sync isn't set up with an s3:// bucket; with it on, each call the gateway serves gets an id (UTC HHMMSS-<16 hex>, said back in X-Magpie-Archive-Id) and, once it is recorded, its method, path and query, request headers and body and response status, headers and body go as one JSON file to <prefix>/magpie/archive/<YYYY-MM-DD>/<id>.json in the bucket sync keeps its backup in, signed with the same client (davsync.Bucket, no new SDK). Before anything leaves, Authorization, x-api-key, Cookie, Set-Cookie, any header or JSON field or query parameter named for a key, token, secret or password, and anything that looks like a key or token anywhere in the text (the redaction rules' patterns, in a stream's data lines too) become [REDACTED] — gone, no placeholder kept; the archive is plain JSON, readable in the bucket, not sealed with the passphrase. Uploads go one at a time on their own goroutine from a queue of 16 calls, each body capped at the 256 KB the call already keeps and marked truncated; a full queue drops the call with a log line, a failed upload is logged and shown under the switch until the next one goes, and no request waits on any of it. A recent call the archive kept shows its date and id under its bodies, and "Fetch from archive" (GET /api/archive?date=&id=, only a date and an id of that shape) shows the request's and response's headers and bodies as the bucket has them, or says it isn't there yet. The hook is in record() and the Call literal, so PR #239 's request log lines are not touched; the archived call carries its usage, and with #239 its vendor request id. Only calls through serve() are archived, not Codex's backend, image or video calls. TestArchiveOn, TestArchiveOff, TestArchiveName, TestRequestArchiveToS3 (a real gateway request through the signature-checking fake S3), TestScrub and request-archive.test.cjs fail without the change; TestSettingsSaveKeepsWhatItDoesNotSend now sets requestArchive. A sandbox magpie web with a fake vendor and a fake S3 server uploaded nothing while off; on, it uploaded a signed archive with none of eight planted secrets in it, read it back through /api/archive and in the page, and with the S3 server down served the call in 0.1 s and said why the upload failed. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass (Claude account tests and TestClaudeRunEndsWhenTheClientLeaves pass alone); request-archive, click-scroll, old-webkit, sse-body, gateway-fold pass.
2026-10-01 17:13:34 +08:00
2026-10-23 18:01:26 +08:00
2026-10-23 20:53:53 +08:00
2026-10-25 16:16:27 +08:00
2026-10-25 16:16:27 +08:00
2026-10-28 11:23:46 +08:00
2026-10-25 09:57:21 +08:00
2026-10-25 16:48:07 +08:00
2026-10-27 15:34:38 +08:00
2026-10-24 19:41:02 +08:00
2026-10-20 05:15:19 +08:00
2026-10-21 06:12:37 +08:00
2026-10-25 16:55:06 +08:00