-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
URL Parsing Error Due to Newline Character Inclusion #13490
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
Comments
I'm getting this as an |
@timdorr Yes, but normally it should be captured by the '*' wildcard, leading to a 404 page. like this: ![]() |
I know, I'm just giving more context than the obfuscated error on the reactrouter.com site. |
It seems that this can be fixed by adding the |
I'm using React Router as a...
library
Reproduction
When a URL contains a newline character (either as
%0a
), the system throws an error but fails to properly handle it in the routing layer.example:
https://reactrouter.com/home/%0a
System Info
System: OS: macOS 15.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 104.27 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 23.10.0 - /opt/homebrew/opt/node/bin/node npm: 10.9.2 - /opt/homebrew/opt/node/bin/npm pnpm: 10.5.2 - /opt/homebrew/bin/pnpm Browsers: Chrome: 135.0.7049.115 Safari: 18.4 npmPackages: react-router: ^7.5.3 => 7.5.3
Used Package Manager
npm
Expected Behavior
Caught by wildcard route (for 404 pages)
Actual Behavior
throws a server error
The text was updated successfully, but these errors were encountered: