From df043c5639a2eb591121ae673f6ddd690e964f45 Mon Sep 17 00:00:00 2001 From: hellcat Date: Wed, 4 Nov 2026 16:30:45 +0800 Subject: [PATCH] fix(fuc-xb): retain same-origin provenance for staging form Keep strict Origin validation. Send same-origin referrer policy so browser form POST does not produce an opaque null Origin. --- scripts/fuc-xb-stage-gate/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/fuc-xb-stage-gate/index.php b/scripts/fuc-xb-stage-gate/index.php index 24452ee2..7ccd3ccd 100644 --- a/scripts/fuc-xb-stage-gate/index.php +++ b/scripts/fuc-xb-stage-gate/index.php @@ -7,7 +7,8 @@ header('Pragma: no-cache'); header('X-Robots-Tag: noindex, nofollow, noarchive'); header("Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'; base-uri 'none'"); header('X-Content-Type-Options: nosniff'); -header('Referrer-Policy: no-referrer'); +// Keep same-origin form provenance; no-referrer makes browser POST Origin null. +header('Referrer-Policy: same-origin'); $method = $_SERVER['REQUEST_METHOD'] ?? ''; $cookieOptions = ['expires' => time() + 3600, 'path' => '/', 'secure' => true, 'httponly' => true, 'samesite' => 'Strict']; $csrfOptions = ['expires' => time() + 600, 'path' => '/stage-login', 'secure' => true, 'httponly' => true, 'samesite' => 'Strict'];