Malformed URL "/..**" causes Error 500 instead of 404
See original GitHub issueSteps to reproduce:
- Navigate to https://cookbook.vaadin.com/…**
Expected behavior: 404 error
Actual behavior: 500 error
Example stacktrace:
java.lang.IllegalArgumentException: Relative path cannot contain .. segments
at com.vaadin.flow.router.Location.verifyRelativePath(Location.java:322) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
at com.vaadin.flow.router.Location.parsePath(Location.java:281) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
at com.vaadin.flow.router.Location.<init>(Location.java:56) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
at com.vaadin.flow.router.Router.getLocationForRequest(Router.java:148) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
at com.vaadin.flow.router.Router.resolveNavigationTarget(Router.java:163) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
at com.vaadin.flow.server.BootstrapUtils.resolvePageConfigurationHolder(BootstrapUtils.java:285) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
at com.vaadin.flow.server.BootstrapHandler$BootstrapContext.<init>(BootstrapHandler.java:195) ~[flow-server-5.0.0.beta1.jar:5.0.0.beta1]
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Invalid URLs trigger 500 errors indicating Server ... - GitHub
Invalid URLs trigger 500 errors indicating Server Error instead of 400 ... I was going to say yeah make it a 404, but...
Read more >500 Internal Server Error instead of: 404 - Not Found
htaccess cause the server to output a 500 instead of a 404 error which should appear when trying to access a non-existant site....
Read more >Technical SEO: The ABCs of 404 errors - The Raven Blog
For example, if the original URL redirected to a https:// and those pages are later removed, it will return a 500 error. You...
Read more >What Is a 500 Internal Server Error? How to Troubleshoot
A 500 internal server error indicates a non-specific problem with a website's server and is usually beyond a user's control.
Read more >HTTP/1.1: Status Code Definitions
This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On second thought, Tomcat serves
400 Bad Request
in case of malformed request URL (like if the requested path contains forbidden characters). Since we’re also talking about forbidden characters there, maybe we should stick with that convention.This ticket/PR has been released with platform 14.7.0.rc1 and is also targeting the upcoming stable 14.7.0 version.