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
we had a strange problem occurring in production where svelte-kit crashes when calling the site with https://foo.com//. The problem is, that the JavaScript URL class can't handle a single double slash string, such es
newURL('//','http://dummy')
Probably this syntax expects a string after the slashes, as it is the start of a schemaless URL, such as //foo.com/bla.
Surprisingly the crash does not occur on my local Macbook with the project being run using npm run dev. Here a redirect happens, which is also the expected behavior.
Thanks
Reproduction
In the built version of the project, go to the site https://foo.com// with double slashes at the end.
Logs
node:internal/url:553
throw new ERR_INVALID_URL(input);
^
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:372:5)
at URL.onParseError (node:internal/url:553:9)
at new URL (node:internal/url:629:5)
at file:///www/project/node_modules/@sveltejs/kit/dist/chunks/index5.js:101:33
at next (file:///www/project/node_modules/@sveltejs/kit/dist/chunks/index5.js:218:5)
at file:///www/project/node_modules/@sveltejs/kit/dist/chunks/index5.js:218:29
at file:///www/project/node_modules/@sveltejs/kit/dist/chunks/index5.js:34:25
at next (file:///www/project/node_modules/@sveltejs/kit/dist/chunks/index5.js:218:5)
at file:///www/project/node_modules/@sveltejs/kit/dist/chunks/index5.js:218:29
at file:///www/project/node_modules/@sveltejs/kit/dist/chunks/constants.js:642:28 {
input: '//',
code: 'ERR_INVALID_URL'
}
Thanks, I searched for the problem on the issues but couldn't find #2532, thanks. Seems the built did not upgrade the kit, it still runs on 1.0.0-next.303.
Describe the bug
Hello,
we had a strange problem occurring in production where svelte-kit crashes when calling the site with https://foo.com//. The problem is, that the JavaScript URL class can't handle a single double slash string, such es
Probably this syntax expects a string after the slashes, as it is the start of a schemaless URL, such as
//foo.com/bla
.Surprisingly the crash does not occur on my local Macbook with the project being run using
npm run dev
. Here a redirect happens, which is also the expected behavior.Thanks
Reproduction
In the built version of the project, go to the site https://foo.com// with double slashes at the end.
Logs
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: