Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to parse cookie with an equal in its value #174

Closed
ignapas opened this issue May 7, 2020 · 3 comments · Fixed by #175
Closed

Failing to parse cookie with an equal in its value #174

ignapas opened this issue May 7, 2020 · 3 comments · Fixed by #175
Assignees
Labels

Comments

@ignapas
Copy link
Contributor

ignapas commented May 7, 2020

This line

[cookie.split('=') for cookie in value.split('; ')])

causes a cookie with an equal in its value to throw an exception like
ValueError: dictionary update sequence element #0 has length 3; 2 is required

The fix for that could be:

[cookie.split('=', 1) for cookie in value.split('; ')])
@miguelgrinberg
Copy link
Owner

Yes, I agree. I'll fix it. Thanks!

@ignapas
Copy link
Contributor Author

ignapas commented May 7, 2020

Yes, I agree. I'll fix it. Thanks!

PRed

@miguelgrinberg
Copy link
Owner

Awesome, thank you for taking care of it!

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

Successfully merging a pull request may close this issue.

2 participants