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

The isRelativeUrl check doesn't allow url with '=' #1880

Open
3 tasks done
GMartigny opened this issue Nov 15, 2024 · 0 comments
Open
3 tasks done

The isRelativeUrl check doesn't allow url with '=' #1880

GMartigny opened this issue Nov 15, 2024 · 0 comments
Labels

Comments

@GMartigny
Copy link

Version

module: 5.0.0-1667386184.dfbbb54
nuxt: 2.16

What is expected?

When user load an URL without being logged in, a cookie is set to redirect once logged in.

What is actually happening?

Cookie is not set when URL contains = (an certainly other valid characters)

Steps to reproduce

  • Log out
  • Navigate to /my-files/TmV2ZXIgZ29ubmEgbGV0IHlvdSBkb3duICE=
  • Redirected to /login as expected
  • Check that cookie auth.redirect is not set

Additional information

This is due to the isRelativeURL function not accepting =. This should be rework and use a battle-tested library (is-relative) instead of a random regex.

Checklist

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn't been reported yet
@GMartigny GMartigny added the bug label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant