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

404 when escaped slashes are in the url #177

Open
jonenst opened this issue Aug 21, 2020 · 1 comment
Open

404 when escaped slashes are in the url #177

jonenst opened this issue Aug 21, 2020 · 1 comment

Comments

@jonenst
Copy link
Contributor

jonenst commented Aug 21, 2020

if you name a study "A/B",
the url is https://demo.powsybl.org/gridstudy/studies/A%2FB

but our apache generates the wrong base for this (../.. instead of ..)

@jonenst
Copy link
Contributor Author

jonenst commented Aug 21, 2020

Actually some reverse proxy was replacing the %2F with a real slash, hence the wrong base.

However, when doing the correct request with %2F, the server responds with a 404 ! huge bug

root@gridstudy-app-59cd9bc67d-dp6f6:/usr/local/apache2# curl -s 'http://localhost/foo/bar/baz/' | sed -e 's/.*base href//' | sed -e 's/meta.*//g' ; echo
="../../.."/><
root@gridstudy-app-59cd9bc67d-dp6f6:/usr/local/apache2# curl -s 'http://localhost/foo/a%20b/baz/' | sed -e 's/.*base href//' | sed -e 's/meta.*//g' ; echo
="../../.."/><
root@gridstudy-app-59cd9bc67d-dp6f6:/usr/local/apache2# curl -s 'http://localhost/foo/a%2Eb/baz/' | sed -e 's/.*base href//' | sed -e 's/meta.*//g' ; echo
="../../.."/><
root@gridstudy-app-59cd9bc67d-dp6f6:/usr/local/apache2# curl -s 'http://localhost/foo/a%2Fb/baz/' | sed -e 's/.*base href//' | sed -e 's/meta.*//g' ; echo
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>

@jonenst jonenst changed the title bad base when escaped slashes are in the url 404 when escaped slashes are in the url Aug 21, 2020
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

No branches or pull requests

1 participant