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: Fix open redirect vulnerability for localePrefix: 'as-necessary' by sanitizing pathname in the middleware #1208

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

hblee12294
Copy link
Contributor

@hblee12294 hblee12294 commented Jul 19, 2024

Fixes #1207 (see issue for details)

Copy link

vercel bot commented Jul 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 9:23am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 9:23am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 9:23am

Copy link

vercel bot commented Jul 19, 2024

@hblee12294 is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.

@amannn amannn changed the title fix: Fix open redirect vulnerability by sanitizing pathname in the mi… fix: Fix open redirect vulnerability by sanitizing pathname in the middleware Jul 19, 2024
Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hblee12294—thanks a ton for this. For noticing, the clear bug description and even setting out to submit a PR. Much appreciated!

@amannn amannn changed the title fix: Fix open redirect vulnerability by sanitizing pathname in the middleware fix: Fix open redirect vulnerability for localePrefix: 'as-necessary' by sanitizing pathname in the middleware Jul 19, 2024
@amannn amannn merged commit f42ac01 into amannn:main Jul 19, 2024
8 checks passed
@hblee12294
Copy link
Contributor Author

@hblee12294—thanks a ton for this. For noticing, the clear bug description and even setting out to submit a PR. Much appreciated!

Cheers!

@hblee12294 hblee12294 deleted the fix/open-redirect-attack branch July 19, 2024 15:42
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 exposed when localePrefix: 'as-needed'
2 participants