question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Malformed URL "/..**" causes Error 500 instead of 404

See original GitHub issue

Steps to reproduce:

  1. 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fluorumlabscommented, Nov 23, 2020

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.

0reactions
vaadin-botcommented, Aug 31, 2021

This ticket/PR has been released with platform 14.7.0.rc1 and is also targeting the upcoming stable 14.7.0 version.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found