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

Invalid characters in cookie value #10

Open
szepeviktor opened this issue Dec 1, 2024 · 2 comments
Open

Invalid characters in cookie value #10

szepeviktor opened this issue Dec 1, 2024 · 2 comments

Comments

@szepeviktor
Copy link
Contributor

szepeviktor commented Dec 1, 2024

                       ; US-ASCII characters excluding CTLs,
                       ; whitespace DQUOTE, comma, semicolon,
                       ; and backslash

https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1

... the string does not contain any commas, semicolons, or whitespace ...

https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

@iamgergo qkie must ensure only these characters get in to value.

... also decode URL-encoded strings in get()

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Dec 1, 2024

special-key=kört;e; expires=; path=/; SameSite=Lax; Secure=true

special-key=k%C3%B6rt%3Be; expires=; path=/; SameSite=Lax; Secure=true

@iamgergo
Copy link
Member

iamgergo commented Dec 2, 2024

qkie must ensure only these characters get in to value.

Not sure I understand you. We need a regexp that filters some characters? Can you give me an example?

also decode URL-encoded strings in get()

Not in set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants