You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your URL looks like /login?returnTo=/path?foo=bar, it will try to match on /login?returnTo=/path and fail. Because the current solution prioritizes the ability to use an invalid character for a route path (?), we get into this weird situation. An easy fix would just be going to the first ?, instead, since as soon as that character is reached, the path has been terminated.
In running nuxt in dev mode, this isn't an issue if I just escape the query string (which I do), but due to how the unjs/nitro handler is providing the URL to the router (it is using withQuery), the query string gets unescaped already. Double-encoding the query string means that it works figuring out the correct handler, but then breaks when trying to read that query string in the handler.
The text was updated successfully, but these errors were encountered:
The fix in #77/#78 doesn't quite work correctly.
If your URL looks like
/login?returnTo=/path?foo=bar
, it will try to match on/login?returnTo=/path
and fail. Because the current solution prioritizes the ability to use an invalid character for a route path (?
), we get into this weird situation. An easy fix would just be going to the first?
, instead, since as soon as that character is reached, the path has been terminated.In running nuxt in dev mode, this isn't an issue if I just escape the query string (which I do), but due to how the unjs/nitro handler is providing the URL to the router (it is using withQuery), the query string gets unescaped already. Double-encoding the query string means that it works figuring out the correct handler, but then breaks when trying to read that query string in the handler.
The text was updated successfully, but these errors were encountered: