Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

decodeURIComponent when getting cookies and encodeURIComponent when setting them #18

Closed
IlCallo opened this issue Jun 10, 2020 · 1 comment · Fixed by #94
Closed

decodeURIComponent when getting cookies and encodeURIComponent when setting them #18

IlCallo opened this issue Jun 10, 2020 · 1 comment · Fixed by #94
Milestone

Comments

@IlCallo
Copy link

IlCallo commented Jun 10, 2020

Describe the bug
All web frameworks encode Cookies with a function similar to encodeURIComponent (eg. Laravel XSRF-TOKEN) and consequentially need to be decoded with decodeURIComponent when retrived by Http.getCookies (and encoded when set).

Expected behavior
Cookies should be encoded with encodeURIComponent when set and decoded with decodeURIComponent when retrieved.

Additional context
https://stackoverflow.com/questions/1969232/what-are-allowed-characters-in-cookies/1969339#1969339

https://stackoverflow.com/questions/49205195/should-cookie-values-be-url-encoded

@thomasvidas thomasvidas added this to the 0.3.0 milestone Jan 19, 2021
@thomasvidas thomasvidas modified the milestones: 0.3.0, 1.0.0 Feb 2, 2021
@thomasvidas thomasvidas linked a pull request Feb 12, 2021 that will close this issue
@thomasvidas
Copy link
Contributor

Merged into capacitor-v3 branch, so I'm closing this issue

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

Successfully merging a pull request may close this issue.

2 participants