From ce53c2b29858c97bc0952083225dccd333681e6a Mon Sep 17 00:00:00 2001 From: Moshiur Date: Tue, 22 Nov 2022 03:44:45 -0500 Subject: [PATCH 1/2] Add ValueError error handling for cookiejar.py Added ValueError error handling for cookiejar.py. Bug ticket raised forced a ValueError by attempting to load an empty MozillaCookieJar object. This caused an error in line 2041, where it attempted to unpack and assign 1 value to 7 values. --- Lib/http/cookiejar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index 65c45e2b17dfc0..e0b914c53f0614 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -2076,6 +2076,8 @@ def _really_load(self, f, filename, ignore_discard, ignore_expires): except OSError: raise + except ValueError: + raise except Exception: _warn_unhandled_exception() raise LoadError("invalid Netscape format cookies file %r: %r" % From 154810dcc389523778f00185d230a809c2b4b214 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 09:02:19 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2022-11-22-09-02-18.gh-issue-99453.jPhGOz.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2022-11-22-09-02-18.gh-issue-99453.jPhGOz.rst diff --git a/Misc/NEWS.d/next/Library/2022-11-22-09-02-18.gh-issue-99453.jPhGOz.rst b/Misc/NEWS.d/next/Library/2022-11-22-09-02-18.gh-issue-99453.jPhGOz.rst new file mode 100644 index 00000000000000..9c558e357c4167 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-11-22-09-02-18.gh-issue-99453.jPhGOz.rst @@ -0,0 +1 @@ +.