Skip to content

fix: fall through to app on allowlist mismatch when no file exists - #1120

Open
rootsiemen wants to merge 1 commit into
crazy-goat:masterfrom
rootsiemen:fix-20261027-allowlist-fallthrough
Open

rootsiemen wants to merge 1 commit into
crazy-goat:masterfrom
rootsiemen:fix-20261027-allowlist-fallthrough

Conversation

@rootsiemen

Copy link
Copy Markdown
Contributor

Closes #1118

The allowlist prefilter answered a bare 404 for any disallowed extension, even when no such file exists, so app routes like /sitemap.xml, /feed.json or /api/export.csv never reached the Symfony app. The prefilter now only answers 404 when the path resolves to an existing file; otherwise the request falls through to the application (fail-open, DEC-013). An existing disallowed file still gets 404, covered by testAllowedExtensionsWhitelistBlocking.

Tests: updated testAllowlistFastPathRejectsDisallowedExtensionBeforeFilesystemProbe to the new fall-through behavior (renamed testAllowlistMismatchFallsThroughWhenNoFileExists) and added testAllowlistMismatchDoesNotShadowAppRoutes covering the issue repro paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] allowed_extensions makes the static layer return 404 for app routes with a disallowed extension

1 participant