nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.94k stars 925 forks source link

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

Open GMartigny opened 1 week ago

GMartigny commented 1 week ago

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

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