Skip to content

fix: close static file allowlist bypass (closes #580) - #603

Merged
s2x merged 2 commits into
masterfrom
fix/issue-580-static-files-extensionless-allowlist
Jul 30, 2026
Merged

fix: close static file allowlist bypass (closes #580)#603
s2x merged 2 commits into
masterfrom
fix/issue-580-static-files-extensionless-allowlist

Conversation

@s2x

@s2x s2x commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #580

Changes

  • Block extensionless files when StaticFilesMiddleware uses allowed_extensions.
  • Keep the denylist authoritative even when a blocked extension is listed.
  • Check blocked path components correctly when filesystem paths use backslashes.
  • Add regression coverage for extensionless files, trailing-dot names, nested .htaccess, Windows separators, and indistinguishable 404 responses.
  • Update static-file security documentation and the unreleased changelog.

Code Review

  • Local security/diff review completed
  • All review findings addressed
  • Full lint passed
  • Full test suite passed

Test results

  • composer lint — passed
  • composer test — passed: 1576 tests, 13360 assertions, 18 skipped, 1 pre-existing warning
  • Targeted StaticFilesMiddlewareTest — passed: 61 tests, 108 assertions

@s2x s2x self-assigned this Jul 30, 2026
@s2x
s2x merged commit 6334ee6 into master Jul 30, 2026
12 checks passed
@s2x
s2x deleted the fix/issue-580-static-files-extensionless-allowlist branch July 30, 2026 21:29
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.

[Security] StaticFilesMiddleware extension allowlist fails open for extensionless files (Dockerfile, id_rsa, dump are served)

1 participant