-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix security issue when url starts from multiple slashes. #44
base: master
Are you sure you want to change the base?
Conversation
Hi @valkuc. Appreciate the patch very much! If you've been watching there are a ton of improvements to this fork of the repository and even more due to cooperation with another fork. For the authentication check does that require the leading slashes to work correctly and that is why removing them breaks going through the authentication check? I'm not sure I'm familiar with the authentication path. |
Suppose you have a next URL mappings:
Navigating to /private/secure.html will prompt user to enter credentials. This can be "hacked" by entering url with extra slash appended. Without this patch accessing URL by //private/secure.html (note the extra slash at beginning) will skip authentication handler. |
It skips the handler because it isn't an exact match for the authentication handler but is a match for the url handler? Would it make sense to strip all but one leading '/'? The original implementation seems to remove them all. |
Yes |
It's interesting that stripping all of the slashes results in an authentication issue. In any case I trust your testing and will apply the changes. |
I have thinking of why this happens, but now don't remember. I have found this issue 4-5 months ago and now decided to create a pull request with it. You can check it, the setup is quite simple. Here is a code snippet for auth handler:
And handler for espfs page:
|
No description provided.