You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 43227ac
Browse filesBrowse the repository at this point in the historyBrowse files
fix(responses): close two post-merge review findings (#2500)
Two threads were opened on #2477 and #2476 shortly before each merged, so
neither was addressed. Both are real and both are one-line predicates.
A selector's namespace is either absent — meaning "unqualified, resolve
the bare name" — or a string naming the group. rewriteNamedSelector
treated every non-string value as absent, so {type:"function",
namespace:1, name:"safe"} took the unqualified path, resolved to a
namespace wire name, and authorized an alias the caller never qualified.
A wrong-but-valid namespace already failed closed; only malformed ones
slipped through. Present-and-invalid now returns the selector untouched.
The snapshot fast path compared content but not permissions. This file
holds persisted request and response bodies and is written owner-only,
and the unconditional rewrite used to restore that on every mutation.
Skipping on content alone let a broadened mode persist for the life of
the process — a durable privacy regression rather than a slow one. A
widened file is now treated as not matching, so the caller rewrites it
through the hardening path. POSIX-only check; Windows ACLs are
re-applied by that same write path.
The docs claim that any byte-identical flush is skipped is also
corrected: the skip needs this process to have written the same bytes to
the same target, and the file to still match.
Tests: five malformed namespace shapes plus an allowed_tools entry, with
positive controls proving neither the qualified nor the unqualified path
regressed; and a mode-broadening regression. Both mutation-proven —
reverting either predicate fails exactly its own cases.
0 commit comments