WICG / cookie-store

Asynchronous access to cookies from JavaScript
https://wicg.github.io/cookie-store/
Apache License 2.0
143 stars 35 forks source link

Add char set / size checks to 'Set a Cookie' section #200

Closed recvfrom closed 3 years ago

recvfrom commented 3 years ago

Fixes #199

This PR attempts to add in the size checks and the control character checks from the latest version of RFC6265bis.

Since the RFC specifies the size limits in octets, proper encoding of the applicable parameters must occur so that the size checks are computed correctly given JavaScript strings.

Please let me know if you have any feedback or suggestions for improving this PR. Thank you!


Preview | Diff

recvfrom commented 3 years ago

I believe I've addressed all the prior feedback - let me know if there's anything else that you think could be improved.

recvfrom commented 3 years ago

AH, I totally missed those. I understand now what you meant when you originally commented that name and value were used encoded in certain steps already. Anyway, I have replaced these instances.

Also, I realized that the RFC link I added was from a newer version of the draft than was linked to elsewhere, which could be a bit confusing. I went ahead and updated all of the existing references to point to the latest draft, attempting to preserve the original intent behind the linking. If you think that needs to be in a separate PR or if you think more changes are needed as a result of this, just let me know. Thanks!