-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Unknown routes with empty _data=
leads to a error server instead 404
#5584
Comments
Just to point out, this was raised by the Security team of my company as a possible vulnerability. Phrasing them:
So, ideally, this kind of error would never throw/show to the client but proper handled by the root |
For what it's worth, a possible mitigation in user land would be to define a catch-all (splat route):
export async function loader() {
return null;
}
export default function NotFound() {
return <div>This page doesn't exist</div>;
} |
thanks @machour. It seems like a valid workaround. But to implement that I'll need to restructure my app. I had the decision to, in the There, I have some routes mapped that it should render that side bar, but if I define a splat route like this, I lost the ability to hide it when it's 404. I'll try to come up with a better layout at least to solve this problem til someone from Remix Team give a heads up about this problem. |
It sounds like the real issue here was the exposing of the stack trace, which was a bug and fixed in
As for whether this should render a It's only inappropriate |
What version of Remix are you using?
1.13.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
2
. It would be catch by CaughtBoundary root;3
Expected Behavior
I'd expect that Remix won't throw a server error like this. Instead, somehow it should hit the
CatchBoundary
.Actual Behavior
It throws the follow error:
The text was updated successfully, but these errors were encountered: