Repository navigation
fastcgi: reject Win 8.3 aliases and alt data streams paths - #8356
Merged
francislavoie merged 1 commit intoNov 4, 2026
Merged
Conversation
โฆipt paths
On NTFS volumes with 8.3 aliases, "/UPLOAD~1.PHP" names
"uploadedpayload.phpx", so the split matched and the backend ran a file
without a split extension. Alternate data streams ("/a.txt:b.php") reach
a non-PHP file the same way. Path matchers cannot see through either,
which is why the file server already rejects them.
On Windows, script paths with an 8.3-shaped component or a ":" now get
a 400. The short name check moves to caddyhttp so the file server and
the FastCGI transport share it, and buildEnv errors keep their status.
Backport of the FrankenPHP fix reported by Daybreak Red.
francislavoie
approved these changes
Nov 4, 2026
francislavoie
pushed a commit
that referenced
this pull request
Nov 5, 2026
(cherry picked from commit 7145e5e)
5 tasks
steadytao
added a commit
to MangoGovo/caddy
that referenced
this pull request
Nov 5, 2026
this was moved during caddyserver#8356 and is not required Signed-off-by: Zen Dodd <mail@steadytao.com>
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.
On NTFS volumes with 8.3 aliases,
/UPLOAD~1.PHPnamesuploadedpayload.phpx, so the split matches and the backend runs a file without a split extension. Alternate data streams (/a.txt:b.php) reach a non-PHP file the same way. Path matchers cannot see through either, which is why the file server already rejects them. 4ec5a5c3 left this case out of scope.On Windows, script paths with an 8.3-shaped component or a
:now get a 400. The short name check moves fromfileservertocaddyhttp.HasWindowsShortNameso both modules share it, andbuildEnverrors now keep their status code.Port of the FrankenPHP fix: php/frankenphp@de3de81
Assistance Disclosure
Claude Code (Claude Opus 5.5) ported this fix from the FrankenPHP patch and wrote the tests. I reviewed and tested the result.