nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.74k stars 480 forks source link

middleware infinite loop caused by `@nuxtjs/i18n` #2578

Open Mini-ghost opened 11 months ago

Mini-ghost commented 11 months ago

Environment


Reproduction

šŸ‘‰ Reproduction

  1. Open Reproduction
  2. Click "Open in New Tab"
  3. Enter route /reset?email=test%40test.dev via change browser URL
  4. Check the terminal output, it will loop infinitely between the two middlewares

https://github.com/nuxt-modules/i18n/assets/39984251/95ffb129-fb16-4dcb-b31d-06a49f113f5b

Describe the bug

Upon entering a page with the query string email=test%40test.dev, it triggers an infinite loop between the router middlewares within the Nuxt server. when accessing the page with email=test@test.dev, this issue does not manifest.

Your attention to this matter would be greatly appreciated. Please let me know if further information or clarification is needed. Thank you for your time and support in resolving this issue.

Mini-ghost commented 11 months ago

This perhaps related to issue #2505

SuddenDev commented 11 months ago

Thanks @Mini-ghost for posting, I have the same issue! Although in my case it's currently just that when i'm on /projects/ and want to redirect to /auth/login, it redirects first to /projects and then goes into the infinite loop.

juanjorge commented 3 months ago

This is still happening for me when the URL has a parameter where the value contains the + symbol. For example: ?email=example+alias@domain.com triggers an infinite loop.

Iā€™d appreciate it if you could fix it. Thanks!