Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treat invalid file path as notFound #5099

Merged
merged 1 commit into from Oct 5, 2022
Merged

Conversation

likev
Copy link
Contributor

@likev likev commented Sep 30, 2022

treat invalid file path as notFound so that PassThru can work
some invalid file path can be valid URL path

treat invalid file path as notFound so that PassThru can work
@CLAassistant
Copy link

CLAassistant commented Sep 30, 2022

CLA assistant check
All committers have signed the CLA.

@francislavoie
Copy link
Member

Please show us examples where this would make a difference. How can we test this behaviour?

@francislavoie francislavoie added the needs info 📭 Requires more information label Sep 30, 2022
@mholt
Copy link
Member

mholt commented Sep 30, 2022

^ Francis beat me to it 😅

I was about to ask the same thing. What is an invalid file path that you've actually encountered?

@likev
Copy link
Contributor Author

likev commented Oct 1, 2022

^ Francis beat me to it sweat_smile

I was about to ask the same thing. What is an invalid file path that you've actually encountered?

https://example.com/a:b is a valid URL but a:b is not a valid directory name under both Windows and macOS.

https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names
https://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, that makes sense. Thanks for the patch!

@mholt mholt merged commit 2be56c5 into caddyserver:master Oct 5, 2022
@mholt mholt added this to the v2.6.2 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info 📭 Requires more information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants