Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'attributes': 0.09; 'cookie': 0.09; 'except:': 0.09; 'subject:2.7': 0.09; 'try:': 0.09; 'python': 0.11; 'bug': 0.12; '2.7?': 0.16; 'sender:addr:gmail.com': 0.17; 'fix': 0.17; '<': 0.19; 'import': 0.22; 'parse': 0.24; 'fixed': 0.29; 'url:bugs': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'correctly.': 0.31; 'question:': 0.31; 'url:python': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'hi,': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'to:addr:python.org': 0.39; 'skip:n 10': 0.64; '2.7.': 0.84; 'subject: #': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=xhRUtw+D/s3SfMYK+V/r0S03yVnICWbtoFvQ16N82NQ=; b=zSBcJ1/6jA8bFhe/IdLllqrT1NEX9sLE57+uEtY5k7TKur4Qma+iVFRXkIF1rfvGVf t0zCg3uz1gIsP0ZScOk6RJCqj7Rx9hdJbOd2gCuFzBCj9NAPhxaL9V6x8Le+jMmnKkOc 5IRnHX6PIu54/TLR6Wtw6UyPROHxMdbNOyCP3uRh5YhgX85xWHCcEryXeKorMbDTN6vX G5utv914UziMkaRZ1BQDp6vZu7R1n95ikOUaERnYgrUmvi3CuVRsuUoXaoI2DPwCwAaf Ze21r51nMcQE+WqL6UZddCW6EjNYJLBAe14n0uKJOHmVKuVy/3nBUftKC8F7s2uVQM53 3cIw== MIME-Version: 1.0 X-Received: by 10.224.88.66 with SMTP id z2mr25618214qal.86.1403052960093; Tue, 17 Jun 2014 17:56:00 -0700 (PDT) Sender: kwatch@gmail.com Date: Wed, 18 Jun 2014 09:56:00 +0900 X-Google-Sender-Auth: L8Nu6sPKcd-klelwecdzUZUhvgk Subject: Backport fix on #16611 to Python 2.7 From: Makoto Kuwata To: python-list@python.org Content-Type: multipart/alternative; boundary=001a11c35042499e1e04fc11b937 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403052963 news.xs4all.nl 2838 [2001:888:2000:d::a6]:56910 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73346 --001a11c35042499e1e04fc11b937 Content-Type: text/plain; charset=UTF-8 Hi, I found a bug on SimpleCookie#load() which doesn't parse 'secure' and 'httponly' attributes correctly. try: from Cookie import SimpleCookie except: from http.cookies import SimpleCookie ck = SimpleCookie() ck.load('name1=value1; Path=/xxx; httponly; secure') print(ck.output()) #=> Set-Cookie: name1=value1; Path=/xxx # (Missing 'httponly' and 'secure' attributes on Python < 3.3.2!) This bug has been registered as #16611, and fixed on 3.3.3. But it is not backported into Python 2.7. http://bugs.python.org/issue16611 My question: Is there any plan to backport the fix to Python 2.7? -- regards, makoto kuwata --001a11c35042499e1e04fc11b937 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I found a bug on SimpleC= ookie#load() which doesn't parse
'secure' and 'ht= tponly' attributes correctly.

=C2=A0 =C2=A0 tr= y:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 from Cookie import SimpleCookie
=C2= =A0 =C2=A0 except:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 from http.cookies = import SimpleCookie
=C2=A0 =C2=A0 ck =3D SimpleCookie()
=C2=A0 =C2=A0 ck.load('name1=3Dvalue1; Path=3D/xxx; httponly; secure&#= 39;)
=C2=A0 =C2=A0 print(ck.output()) =C2=A0#=3D> Set-Cookie: name1=3Dva= lue1; Path=3D/xxx
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # (Mi= ssing 'httponly' and 'secure' attributes on Python < 3.3= .2!)


This bug has been registered a= s #16611, and fixed on 3.3.3.
But it is not backported into Python 2.7.

My question: Is there any plan to backport the fix to Pytho= n 2.7?

--
regards,
makoto kuwata

--001a11c35042499e1e04fc11b937--