From metatracker at psf.upfronthosting.co.za Mon Oct 8 13:53:04 2018 From: metatracker at psf.upfronthosting.co.za (Alberto Moral) Date: Mon, 08 Oct 2018 17:53:04 +0000 Subject: [Tracker-discuss] [issue667] cookielib/cookiejar cookies' expire date parse Message-ID: <1539021184.51.0.545547206417.issue667@psf.upfronthosting.co.za> New submission from Alberto Moral : http.cookiejar (cookielib, python2.*) does not parse some cookies' expire date. For example: "Friday, 1-August-1997 00:00:00 GMT" (while: "Fri, 1-Aug-1997 00:00:00 GMT" works fine) This is basically due to long names of months (it is compared with MONTHS_LOWER: list of 3-letter months). So, I propose a small change in the definition of re's STRICT_DATE_RE and LOOSE_HTTP_DATE_RE: STRICT_DATE_RE = re.compile( r"^[SMTWF][a-z][a-z]+, (\d\d) ([JFMASOND][a-z][a-z])[a-z]+ " r"(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$", re.ASCII) Instead of: STRICT_DATE_RE = re.compile( r"^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) " r"(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$", re.ASCII) And: LOOSE_HTTP_DATE_RE = re.compile( r"""^ (\d\d?) # day (?:\s+|[-\/]) (\w{3})\w+ # month (3 first letters only) ... Instead of: LOOSE_HTTP_DATE_RE = re.compile( r"""^ (\d\d?) # day (?:\s+|[-\/]) (\w+) # month ... I've tested only http.cookiejar (python 3.6), but I suposse the same change will work on cookielib Thanks in advance ---------- messages: 3546 nosy: alb_moral priority: bug status: unread title: cookielib/cookiejar cookies' expire date parse _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Oct 9 01:50:20 2018 From: metatracker at psf.upfronthosting.co.za (Alberto Moral) Date: Tue, 09 Oct 2018 05:50:20 +0000 Subject: [Tracker-discuss] [issue667] cookielib/cookiejar cookies' expire date parse Message-ID: <1539064220.18.0.545547206417.issue667@psf.upfronthosting.co.za> New submission from Alberto Moral : http.cookiejar (cookielib, for python2.*) does not parse some cookies' expire date. For example: "Friday, 1-August-1997 00:00:00 GMT" (while: "Fri, 01 Aug 1997 00:00:00 GMT" works fine) This is basically due to long names of months (it is compared with MONTHS_LOWER: list of 3-letter months). So, I propose a small change in the definition of re LOOSE_HTTP_DATE_RE: LOOSE_HTTP_DATE_RE = re.compile( r"""^ (\d\d?) # day (?:\s+|[-\/]) (\w{3})\w* # month (3 first letters only) ... Instead of: LOOSE_HTTP_DATE_RE = re.compile( r"""^ (\d\d?) # day (?:\s+|[-\/]) (\w+) # month ... I've tested only http.cookiejar (python 3.6), but I suposse the same change will work on cookielib Thanks in advance PD. This is a SECOND VERSION of this issue (I've fixed and removed it). Sorry _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Oct 9 18:50:47 2018 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Tue, 09 Oct 2018 22:50:47 +0000 Subject: [Tracker-discuss] [issue667] cookielib/cookiejar cookies' expire date parse In-Reply-To: <1539064220.18.0.545547206417.issue667@psf.upfronthosting.co.za> Message-ID: <1539125447.77.0.545547206417.issue667@psf.upfronthosting.co.za> Ezio Melotti added the comment: The correct place where to report this is https://bugs.python.org/ See also https://devguide.python.org/tracker/#reporting-an-issue for more information. ---------- assignedto: -> ezio.melotti nosy: +ezio.melotti status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Oct 9 20:38:44 2018 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 10 Oct 2018 00:38:44 +0000 Subject: [Tracker-discuss] [issue668] Wrong header encoding handling in mailgw.py Message-ID: <1539131924.48.0.545547206417.issue668@psf.upfronthosting.co.za> New submission from Ezio Melotti : def _decode_header_to_utf8(self, hdr): l = [] for part, encoding in decode_header(hdr): if encoding: part = part.decode(encoding) l.append(part) return ''.join([s.encode('utf-8') for s in l]) If the encoding is specified, l becomes a list of unicode strings that can be encoded in the listcomp, but if the encoding is not specified, l becomes a list of byte strings that can't be encoded if they contain non-ascii characters. The latter causes lot of decoding errors that gets reported to the admins due to all the spam messages (apparently with no encoding specified) that get sent to b.p.o. I'm going to fix this by attempting the decoding of the part using utf-8 and falling back to iso-8859-1 in case of error. This will ensure that l is a list of unicode strings that can be encoded. This will also stop the decoding errors in the listcomp, and let the spam messages through, hopefully to be blocked shortly after when Roundup figures out the user is not registered. ---------- assignedto: ezio.melotti messages: 3549 nosy: ezio.melotti priority: urgent status: in-progress title: Wrong header encoding handling in mailgw.py _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Oct 9 20:55:02 2018 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 10 Oct 2018 00:55:02 +0000 Subject: [Tracker-discuss] [issue668] Wrong header encoding handling in mailgw.py In-Reply-To: <1539131924.48.0.545547206417.issue668@psf.upfronthosting.co.za> Message-ID: <1539132902.4.0.788709270274.issue668@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed in https://hg.python.org/tracker/roundup/rev/d7454b42b914 ---------- status: in-progress -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Oct 9 21:08:25 2018 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 10 Oct 2018 01:08:25 +0000 Subject: [Tracker-discuss] [issue668] Wrong header encoding handling in mailgw.py In-Reply-To: <1539131924.48.0.545547206417.issue668@psf.upfronthosting.co.za> Message-ID: <1539133705.46.0.788709270274.issue668@psf.upfronthosting.co.za> Ezio Melotti added the comment: Reported upstream at http://issues.roundup-tracker.org/issue2551008 _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Oct 10 04:08:52 2018 From: metatracker at psf.upfronthosting.co.za (Alberto Moral) Date: Wed, 10 Oct 2018 08:08:52 +0000 Subject: [Tracker-discuss] [issue667] cookielib/cookiejar cookies' expire date parse In-Reply-To: <1539064220.18.0.545547206417.issue667@psf.upfronthosting.co.za> Message-ID: <1539158932.51.0.788709270274.issue667@psf.upfronthosting.co.za> Alberto Moral added the comment: Thanks, Ezio I've reported it on https://bugs.python.org/ Sorry for the mistake... I'm a newbie in these matters :) _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Oct 10 17:40:37 2018 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 10 Oct 2018 21:40:37 +0000 Subject: [Tracker-discuss] [issue667] cookielib/cookiejar cookies' expire date parse In-Reply-To: <1539064220.18.0.545547206417.issue667@psf.upfronthosting.co.za> Message-ID: <1539207637.79.0.788709270274.issue667@psf.upfronthosting.co.za> Ezio Melotti added the comment: No problem, thanks for taking the time to report the issue. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Oct 16 10:44:23 2018 From: metatracker at psf.upfronthosting.co.za (Chih-Hsuan Yen) Date: Tue, 16 Oct 2018 14:44:23 +0000 Subject: [Tracker-discuss] [issue578] TLSv1.2 support for https://bugs.python.org/ In-Reply-To: <1452671798.57.0.977243512791.issue578@psf.upfronthosting.co.za> Message-ID: <1539701063.45.0.788709270274.issue578@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: An update: all major browsers (Chrome, Firefox, Safari, Edge) will drop TLS 1.0 and 1.1 in 2020. Chrome: https://security.googleblog.com/2018/10/modernizing-transport-security.html Firefox: https://blog.mozilla.org/security/2018/10/15/removing-old-versions-of-tls/ Safari: https://webkit.org/blog/8462/deprecation-of-legacy-tls-1-0-and-1-1-versions/ Edge: https://blogs.windows.com/msedgedev/2018/10/15/modernizing-tls-edge-ie11/ ---------- status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________