Closed
Description
Describe the bug
This load
function in +page.server.ts
sets a cookie with value "a/b"
:
export function load({cookies}: any) {
cookies.set("test", `"a/b"`);
return {};
}
But the value that's actually returned in the Set-Cookie
header and saved in the browser is %22a%2Fb%22
. This bug only happens when load
is run on the server, not in the browser.
Reproduction
Website: https://l3c2zc-5173.csb.app/
(The code is deployed on the website above, and visiting the website should set the incorrect cookie %22a%2Fb%22
in your browser)
Logs
No response
System Info
System:
OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz
Memory: 26.26 GB / 30.85 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
Browsers:
Chrome: 120.0.6099.234
Severity
serious, but I can work around it
Additional Information
No response