FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-991266: Fix quoting of the Comment attribute of SimpleCookie by berkerpeksag · Pull Request #6555 · python/cpython · GitHub

Repository navigation

bpo-991266: Fix quoting of the Comment attribute of SimpleCookie - #6555

Merged
berkerpeksag merged 1 commit into
python:masterfrom
berkerpeksag:bpo-991266-cookie
Apr 22, 2018
Merged

berkerpeksag merged 1 commit into
python:masterfrom
berkerpeksag:bpo-991266-cookie

Conversation

berkerpeksag commented Apr 20, 2018 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Comment thread Lib/http/cookies.py
elif key == "max-age" and isinstance(value, int):
append("%s=%d" % (self._reserved[key], value))
elif key == "comment" and isinstance(value, str):
append("%s=%s" % (self._reserved[key], _quote(value)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This patch looks like it correctly solves this problem, however is there a reason not to quote all values? (line417)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Like I said in the issue (https://bugs.python.org/issue991266#msg315499) I'm a bit reluctant on that idea. The situation with cookie specs is a bit painful to deal :) Also, I'm not sure we can do that in bugfix releases because of backwards compatibility reasons.

Perhaps we can be a little bit conservative and merge this for now and discuss (like taking a look at other programming languages) a broader change like you and Mark mentioned in the issue for 3.8? I wrote this patch almost two years ago and to be honest I don't remember RFC 6265 and other relevant specs (2109, 2068 etc.) anymore :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ok, I'm fine to 👍 this since it is correct.

berkerpeksag merged commit d5a2377 into python:master Apr 22, 2018

Copy link
Copy Markdown
Contributor

Thanks @berkerpeksag for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

berkerpeksag deleted the bpo-991266-cookie branch April 22, 2018 23:48

Copy link
Copy Markdown

GH-6570 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 22, 2018
…H-6555)

(cherry picked from commit d5a2377)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 22, 2018
…H-6555)

(cherry picked from commit d5a2377)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>

Copy link
Copy Markdown

GH-6571 is a backport of this pull request to the 3.6 branch.

berkerpeksag added a commit that referenced this pull request Apr 23, 2018
(cherry picked from commit d5a2377)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
berkerpeksag added a commit that referenced this pull request Apr 23, 2018
(cherry picked from commit d5a2377)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL