Update to 3.13.13
This commit is contained in:
parent
c444274dd9
commit
c731000e1e
5 changed files with 19 additions and 136 deletions
|
|
@ -51,7 +51,7 @@ index 041dca113a..ca6320df2f 100644
|
|||
if os.path.isdir(sitedir):
|
||||
addsitedir(sitedir, known_paths)
|
||||
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
|
||||
index f7bd675bb3..f1ff347c3d 100644
|
||||
index 43edebce34..40e85568ea 100644
|
||||
--- a/Lib/sysconfig/__init__.py
|
||||
+++ b/Lib/sysconfig/__init__.py
|
||||
@@ -106,6 +106,12 @@
|
||||
|
|
@ -130,7 +130,7 @@ index f7bd675bb3..f1ff347c3d 100644
|
|||
# On Windows we want to substitute 'lib' for schemes rather
|
||||
# than the native value (without modifying vars, in case it
|
||||
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
|
||||
index 9723300f51..310706652a 100644
|
||||
index ce17206a3c..fd95071099 100644
|
||||
--- a/Lib/test/test_sysconfig.py
|
||||
+++ b/Lib/test/test_sysconfig.py
|
||||
@@ -130,8 +130,19 @@ def test_get_path(self):
|
||||
|
|
@ -154,7 +154,7 @@ index 9723300f51..310706652a 100644
|
|||
os.path.normpath(expected),
|
||||
)
|
||||
|
||||
@@ -393,7 +404,7 @@ def test_get_config_h_filename(self):
|
||||
@@ -395,7 +406,7 @@ def test_get_config_h_filename(self):
|
||||
self.assertTrue(os.path.isfile(config_h), config_h)
|
||||
|
||||
def test_get_scheme_names(self):
|
||||
|
|
@ -163,7 +163,7 @@ index 9723300f51..310706652a 100644
|
|||
if HAS_USER_BASE:
|
||||
wanted.extend(['nt_user', 'osx_framework_user', 'posix_user'])
|
||||
self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
|
||||
@@ -405,6 +416,8 @@ def test_symlink(self): # Issue 7880
|
||||
@@ -407,6 +418,8 @@ def test_symlink(self): # Issue 7880
|
||||
cmd = "-c", "import sysconfig; print(sysconfig.get_platform())"
|
||||
self.assertEqual(py.call_real(*cmd), py.call_link(*cmd))
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ which is tested as working.
|
|||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py
|
||||
index cd98407c34..042a3bb9df 100644
|
||||
index 2309353503..fca62245d4 100644
|
||||
--- a/Lib/test/test_pyexpat.py
|
||||
+++ b/Lib/test/test_pyexpat.py
|
||||
@@ -846,6 +846,8 @@ def start_element(name, _):
|
||||
@@ -901,6 +901,8 @@ def start_element(name, _):
|
||||
|
||||
self.assertEqual(started, ['doc'])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,114 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Tue, 24 Mar 2026 00:17:50 +0100
|
||||
Subject: 00478: CVE-2026-4519
|
||||
|
||||
Reject leading dashes in webbrowser URLs (GH-146215)
|
||||
|
||||
(cherry picked from commit 82a24a4442312bdcfc4c799885e8b3e00990f02b)
|
||||
|
||||
Co-authored-by: Seth Michael Larson <seth@python.org>
|
||||
---
|
||||
Lib/test/test_webbrowser.py | 5 +++++
|
||||
Lib/webbrowser.py | 13 +++++++++++++
|
||||
.../2026-01-16-12-04-49.gh-issue-143930.zYC5x3.rst | 1 +
|
||||
3 files changed, 19 insertions(+)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2026-01-16-12-04-49.gh-issue-143930.zYC5x3.rst
|
||||
|
||||
diff --git a/Lib/test/test_webbrowser.py b/Lib/test/test_webbrowser.py
|
||||
index 4fcbc5c2e5..171388e64d 100644
|
||||
--- a/Lib/test/test_webbrowser.py
|
||||
+++ b/Lib/test/test_webbrowser.py
|
||||
@@ -65,6 +65,11 @@ def test_open(self):
|
||||
options=[],
|
||||
arguments=[URL])
|
||||
|
||||
+ def test_reject_dash_prefixes(self):
|
||||
+ browser = self.browser_class(name=CMD_NAME)
|
||||
+ with self.assertRaises(ValueError):
|
||||
+ browser.open(f"--key=val {URL}")
|
||||
+
|
||||
|
||||
class BackgroundBrowserCommandTest(CommandTestMixin, unittest.TestCase):
|
||||
|
||||
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
|
||||
index 2f9555ad60..e322cbf5d1 100755
|
||||
--- a/Lib/webbrowser.py
|
||||
+++ b/Lib/webbrowser.py
|
||||
@@ -164,6 +164,12 @@ def open_new(self, url):
|
||||
def open_new_tab(self, url):
|
||||
return self.open(url, 2)
|
||||
|
||||
+ @staticmethod
|
||||
+ def _check_url(url):
|
||||
+ """Ensures that the URL is safe to pass to subprocesses as a parameter"""
|
||||
+ if url and url.lstrip().startswith("-"):
|
||||
+ raise ValueError(f"Invalid URL: {url}")
|
||||
+
|
||||
|
||||
class GenericBrowser(BaseBrowser):
|
||||
"""Class for all browsers started with a command
|
||||
@@ -181,6 +187,7 @@ def __init__(self, name):
|
||||
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
cmdline = [self.name] + [arg.replace("%s", url)
|
||||
for arg in self.args]
|
||||
try:
|
||||
@@ -201,6 +208,7 @@ def open(self, url, new=0, autoraise=True):
|
||||
cmdline = [self.name] + [arg.replace("%s", url)
|
||||
for arg in self.args]
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
try:
|
||||
if sys.platform[:3] == 'win':
|
||||
p = subprocess.Popen(cmdline)
|
||||
@@ -267,6 +275,7 @@ def _invoke(self, args, remote, autoraise, url=None):
|
||||
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
if new == 0:
|
||||
action = self.remote_action
|
||||
elif new == 1:
|
||||
@@ -358,6 +367,7 @@ class Konqueror(BaseBrowser):
|
||||
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
# XXX Currently I know no way to prevent KFM from opening a new win.
|
||||
if new == 2:
|
||||
action = "newTab"
|
||||
@@ -576,6 +586,7 @@ def register_standard_browsers():
|
||||
class WindowsDefault(BaseBrowser):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
try:
|
||||
os.startfile(url)
|
||||
except OSError:
|
||||
@@ -596,6 +607,7 @@ def __init__(self, name='default'):
|
||||
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
url = url.replace('"', '%22')
|
||||
if self.name == 'default':
|
||||
script = f'open location "{url}"' # opens in default browser
|
||||
@@ -627,6 +639,7 @@ def open(self, url, new=0, autoraise=True):
|
||||
class IOSBrowser(BaseBrowser):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
+ self._check_url(url)
|
||||
# If ctypes isn't available, we can't open a browser
|
||||
if objc is None:
|
||||
return False
|
||||
diff --git a/Misc/NEWS.d/next/Security/2026-01-16-12-04-49.gh-issue-143930.zYC5x3.rst b/Misc/NEWS.d/next/Security/2026-01-16-12-04-49.gh-issue-143930.zYC5x3.rst
|
||||
new file mode 100644
|
||||
index 0000000000..0f27eae99a
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2026-01-16-12-04-49.gh-issue-143930.zYC5x3.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Reject leading dashes in URLs passed to :func:`webbrowser.open`
|
||||
|
|
@ -45,11 +45,11 @@ URL: https://www.python.org/
|
|||
|
||||
# WARNING When rebasing to a new Python version,
|
||||
# remember to update the python3-docs package as well
|
||||
%global general_version %{pybasever}.12
|
||||
%global general_version %{pybasever}.13
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
Release: 2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
License: Python-2.0.1
|
||||
|
||||
|
||||
|
|
@ -109,21 +109,21 @@ License: Python-2.0.1
|
|||
# This needs to be manually updated when we update Python.
|
||||
# Explore the sources tarball (you need the version before %%prep is executed):
|
||||
# $ tar -tf Python-%%{upstream_version}.tar.xz | grep whl
|
||||
%global pip_version 25.3
|
||||
%global pip_version 26.0.1
|
||||
%global setuptools_version 79.0.1
|
||||
# All of those also include a list of indirect bundled libs:
|
||||
# pip
|
||||
# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt)
|
||||
%global pip_bundled_provides %{expand:
|
||||
Provides: bundled(python3dist(cachecontrol)) = 0.14.3
|
||||
Provides: bundled(python3dist(certifi)) = 2025.10.5
|
||||
Provides: bundled(python3dist(cachecontrol)) = 0.14.4
|
||||
Provides: bundled(python3dist(certifi)) = 2026.1.4
|
||||
Provides: bundled(python3dist(dependency-groups)) = 1.3.1
|
||||
Provides: bundled(python3dist(distlib)) = 0.4
|
||||
Provides: bundled(python3dist(distro)) = 1.9
|
||||
Provides: bundled(python3dist(idna)) = 3.10
|
||||
Provides: bundled(python3dist(idna)) = 3.11
|
||||
Provides: bundled(python3dist(msgpack)) = 1.1.2
|
||||
Provides: bundled(python3dist(packaging)) = 25
|
||||
Provides: bundled(python3dist(platformdirs)) = 4.5
|
||||
Provides: bundled(python3dist(packaging)) = 26
|
||||
Provides: bundled(python3dist(platformdirs)) = 4.5.1
|
||||
Provides: bundled(python3dist(pygments)) = 2.19.2
|
||||
Provides: bundled(python3dist(pyproject-hooks)) = 1.2
|
||||
Provides: bundled(python3dist(requests)) = 2.32.5
|
||||
|
|
@ -421,12 +421,6 @@ Patch475: 00475-cve-2025-15367.patch
|
|||
# direct call to the check function.
|
||||
Patch477: 00477-raise-an-error-when-importing-stdlib-modules-compiled-for-a-different-python-version.patch
|
||||
|
||||
# 00478 # 6f5526308e189515c79efb05770d4b2b5aefc0d0
|
||||
# CVE-2026-4519
|
||||
#
|
||||
# Reject leading dashes in webbrowser URLs (GH-146215)
|
||||
Patch478: 00478-cve-2026-4519.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
#
|
||||
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
||||
|
|
@ -1832,6 +1826,9 @@ CheckPython freethreading
|
|||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Wed Apr 08 2026 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.13.13-1
|
||||
- Update to 3.13.13
|
||||
|
||||
* Thu Mar 26 2026 Lumír Balhar <lbalhar@redhat.com> - 3.13.12-2
|
||||
- Security fix for CVE-2026-4519 (rhbz#2449729)
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (Python-3.13.12.tar.xz) = 5edecdf13999d8629f31543dffdcba521dbb5633577e481ee49275e377509a2f6d700624c26f95b57a8ff9501378d10d7c07c1d0e7e19be0d6c88f05b6315a13
|
||||
SHA512 (Python-3.13.12.tar.xz.asc) = 6d42bc51b3658e1b092e7ab44306f6fc968646a7a9aeb63a3c443d1f75e27153a2138e88c15cebf8d559ce6d7744acecd4e6026c6d0be6fde070f804042d4aea
|
||||
SHA512 (Python-3.13.13.tar.xz) = 0ef615150a52865fe7ca0d0e106cf98488f113a56e5ae1b1437673f03880423839d04abe1999006f9835c77d8802d5ae94a1bdf63d18074a9a19c81e6f7b69e8
|
||||
SHA512 (Python-3.13.13.tar.xz.asc) = 21e5235cd9a9df3546370feb55ac32539e08601b79ee7b1e39006028f192be6be0434f2f8384fdcc993b70bde7471be3b36ce9850abf0473d1fe2c7cdc98304b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue