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

fix: don't apply any locale-logic to non-existent routes #1093

Merged
merged 5 commits into from
Mar 7, 2021

Conversation

rchl
Copy link
Collaborator

@rchl rchl commented Mar 7, 2021

If the resolved path for a given locale is 404 then don't attempt to
redirect to that path. This affects redirects on locale change, page
load, and just the behavior of "localePath" API. Avoids redirecting
unnecessarily to a route that doesn't exist anyway.

That also fixes the security issue with redirecting to a different
domain but just in case added an additional measure against that.

Resolves #1092

rchl added 4 commits March 7, 2021 11:59
If the resolved path for a given locale is 404 then don't attempt to
change the path to locale specific. Avoids redirecting unnecessarily to
a route that doesn't exist anyway.

That also fixes the security issue with redirecting to a different
domain but just in case added an additional measure against that.

Resolves #1092
@rchl rchl mentioned this pull request Mar 7, 2021
1 task
@rchl rchl changed the title fix: don't resolve paths to non-existent routes fix: don't apply any locale-logic to non-existent routes Mar 7, 2021
@rchl rchl merged commit 7180412 into master Mar 7, 2021
@rchl rchl deleted the fix/domain-redirect branch March 7, 2021 19:39
This was referenced Mar 9, 2021
This was referenced Mar 15, 2021
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

Successfully merging this pull request may close these issues.

open redirect vulnerability
1 participant