Skip to content

Unable to get cookies with . in the name #44

@KevinBodi

Description

@KevinBodi

Describe the bug

It's not possible to get cookies with a . in their name, like ab-test.variant-1. For now, a workaround is to not use . in the name like ab-test_variant-1.

It's still possible in the plugin to write cookies with . in their name and the cookie shows up both in the HTTP request headers and in the request tab in the debugger toolbar.

While this issue has a simple workaround, it can cause some time spent on debugging and that I see that some third-party tools set cookie names with . in them and they won't be possible to get with this plugin.

To reproduce

Steps to reproduce the behaviour:

  1. Use getCookie() on any cookie with . in it's name
  2. Get nothing

Expected behaviour

Get the value from the cookie or a error that I can't use this symbol for retrieving cookies.

Versions

  • Plugin version: 5.0.0
  • Craft version: 5.7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions