fix(fetch): accept what a host label may be, not a list of what it may not #732
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!732
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/every-label-in-a-wildcard-prefix-is-a-label"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nine invalid host-label shapes matched a wildcard allowlist entry. Measured and specified by the filer; this applies it.
The shape of the fix
The guard named bad shapes one at a time: empty prefix, leading dot, doubled dot. Three exclusions left nine standing.
validHostLabelaccepts what a label may be instead, so the next unlisted shape is refused rather than admitted.Not exploitable today, and that is not why it ships
allowedURLis the only caller and passesparsed.Hostname(), which strips the port and cannot contain a slash. The filer declined to raise its priority and I agree. What justifies it is the standard already inTestTheHostIsNormalisedInside:The slash and colon rows are that sentence one field over.
The landmine, which now has a test rather than a comment
validHostLabelhas no uppercase arm becausehostAllowedlowercases first. The filer flagged that reordering the two would silently refuse every capitalised host.TestALabelCheckThatRunsAfterLowercasingholds it from both sides: capitalised hosts still match throughhostAllowed, andvalidHostLabel("WWW")is false on purpose.Verification
ward exec gatePASS on all six steps. The nine rows flip and theirissuefields clear, sohostlabelshape_test.goreports 0 rows still disagree. The five must-allow rows stay green,xn--a.mozilla.comincluded.Two mutations, both in runs where the package compiles:
validHostLabelreturning true always: failsTestEveryLabelBeforeTheSuffixIsReal,TestALabelCheckThatRunsAfterLowercasing,TestAnInvalidLabelShape.TestALabelCheckThatRunsAfterLowercasingby name, plus three existing normalisation rows.closes #726