Skip to content

amp_cookie_test cookie values can contain disallowed characters #481

@mickaeltr

Description

@mickaeltr

Expected Behavior

amp_cookie_test cookies should not be rejected by firewalls.

Current Behavior

amp_cookie_test cookie values can sometimes be rejected by firewalls, such as the Spring Security StrictHttpFirewall

Here is an example of a cookie that does not pass through the firewall, because of special characters (\u0080\u0099):
amp_cookie_testZ4RgnufBu172SVyuXfqfSV=Sat Dec 18 2021 22:50:11 GMT+0100 (Ora standard dellâ\u0080\u0099Europa centrale);

Possible Solution

Maybe use something like new Date().toUTCString() rather than String(new Date()) in base-cookies.js

Steps to Reproduce

Environment

  • JS SDK Version:
  • Installation Method:
  • Browser and Version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions