base64 cookies
See original GitHub issueto avoid issues with cookie strings with ;
and stuff.
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Base64 Encoding of "cookies" - Online
Encode cookies to Base64 format with various advanced options. Our site has an easy to use online tool to convert your data.
Read more >Cookie encoding Base64 - Stack Overflow
Cookies can be base64 encode. So if I capture pcap, does there any way, I can tell that cookie is base64 encoded? The...
Read more >Online Tool | Encode: cookie - Base64 Encode
Basically, Base64 is a collection of related encoding designs which represent the binary information in ASCII format by converting it into a base64...
Read more >Cookies are always base64 and JSON encoded #158 - GitHub
At present, the cookie utilities always encode (and expect to decode) a base64, JSON value, using the encodeCookieValue/decodeCookieValue functions.
Read more >How to modify a Base64 encoded cookie? - Google Groups
I was doing a test on a website and noticed that the cookie set by it can be Base64 decoded. And upon decoding...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The answer is they are URL-encoded, or not. It’s up to the server, as cookie values are opaque ASCII values (see RFC 2965). The server just has to encode it the same way it wants to receive the value; the client does not do anything with the value. I’ve only seen servers encoding into UTF-8 and escaping the values (with, for example,
escape
orencodeURIComponent
).But yea, this module could certainly base64-encode the values or URL-encode the values, as long as it decodes them in the same way 😄
@dougwilson I did some additional research. RFC2109 specifies this grammar:
You’ll note it calls out “token” as from HTTP/1.1, which states this:
Therefore base64-encoded values when they include “=” need to be quoted strings or URL-encoded. I would recommend always using quoted-strings as that seems like it should always work for a conforming client.