fix: remove invalid smart-quoted "null" CORS origin from config#76
Closed
CGFixIT wants to merge 1 commit into
Closed
fix: remove invalid smart-quoted "null" CORS origin from config#76CGFixIT wants to merge 1 commit into
CGFixIT wants to merge 1 commit into
Conversation
allowed_origins contained `- "null"` written with curly/smart quotes, so YAML parsed it as the literal 6-char string `"null"` (quote chars included) rather than a usable origin. It matched no real browser Origin header and directly contradicted the file's own note that the `null` origin was removed. Drop the dead entry so the list matches its documented intent and contains only valid origins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
config.yaml→security.allowed_originscontained:The quotes around
nullare curly/smart quotes (“ ”), not straight quotes. YAML therefore parses this as the literal 6-character string“null”(curly quotes included), whichgate.pyfeeds straight into Starlette'sCORSMiddlewareallow_origins.This entry:
Originheader (a real null origin is sent asnull, not“null”), so it is dead config.nullorigin was removed because "null in allow_origins is invalid for starlette CORSMiddleware and would cause a runtime error or silent rejection."This finding was also flagged in the runtime verification report (PR #63, F5) and the 2026-06-19 audit (PR #46), but those PRs are report documents — no code fix landed.
Change
Remove the dead
“null”entry. The remaining list contains only valid, intended loopback/LAN origins.Benefit
allowed_originsnow matches its own documented intent.Originheader so they were never subject to CORS filtering.🤖 Generated with Claude Code
Generated by Claude Code