Skip to content

parse_cookie(): Does not ignore empty cookies #1245

@srittau

Description

@srittau
parse_cookie("foo=bar; ; abc=def")
{'foo': 'bar', '; abc': 'def'}

As you can see, instead of a cookie named abc, there is one named ; abc. I came across this problem when I accidentally added an empty cookie in Chrome by calling document.cookie = "" from Javascript. Chrome then sent a Cookie header similar to the one above, which caused another cookie not to be found anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions