fix: address review nits from batch integration follow-ups (#818)
- browser: reject empty Referrer-Policy tokens structurally while still skipping them per W3 fallback semantics. - browser: document that WebMCP keys cannot collapse since unknown frames are excluded before keying. - ghidra: split NativeAOT non-recovery diagnostics into reason-missing vs payload-present variants with exact assertions. - reference: lock secret-patterned exclusion before failure projection so failure messages cannot carry secret paths. - doctor: lock direct-launcher Codex timeout ordering both ways. - native: note plutil -n macOS 12+ requirement; add fat-output control guarding the thin pre-scan. - reconstruction: multi-unknown limitation coverage via shared helper. Tracks #817 for the remaining smol-toml advisory.
This commit is contained in:
@@ -331,7 +331,8 @@ const referrerPolicy = (value: string | undefined): string | null => {
|
||||
let policy: string | null = null;
|
||||
for (const raw of (value ?? "").split(",")) {
|
||||
const token = raw.trim().toLowerCase();
|
||||
if (!/^[a-z-]*$/u.test(token)) return null;
|
||||
if (token === "") continue;
|
||||
if (!/^[a-z-]+$/u.test(token)) return null;
|
||||
if (referrerPolicies.has(token)) policy = token;
|
||||
}
|
||||
return policy;
|
||||
|
||||
Reference in New Issue
Block a user