Compare commits
10 Commits
06131bc200
...
5a9871b416
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a9871b416 | ||
|
|
c59b48d363 | ||
|
|
4663b54200 | ||
|
|
761b12e116 | ||
|
|
6cec6532fe | ||
|
|
9731382e7d | ||
|
|
6294ae57dc | ||
|
|
6e46da5e2e | ||
|
|
48a531c443 | ||
|
|
10cda34ea6 |
28
CVE-2024-36039.patch
Normal file
28
CVE-2024-36039.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 521e40050cb386a499f68f483fefd144c493053c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Inada Naoki <songofacandy@gmail.com>
|
||||||
|
Date: Sat, 18 May 2024 11:33:30 +0900
|
||||||
|
Subject: [PATCH] forbid dict parameter
|
||||||
|
|
||||||
|
Origin: https://github.com/PyMySQL/PyMySQL/commit/521e40050cb386a499f68f483fefd144c493053c
|
||||||
|
|
||||||
|
---
|
||||||
|
pymysql/converters.py | 6 +-----
|
||||||
|
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pymysql/converters.py b/pymysql/converters.py
|
||||||
|
index 1adac752..dbf97ca7 100644
|
||||||
|
--- a/pymysql/converters.py
|
||||||
|
+++ b/pymysql/converters.py
|
||||||
|
@@ -28,11 +28,7 @@ def escape_item(val, charset, mapping=None):
|
||||||
|
return val
|
||||||
|
|
||||||
|
def escape_dict(val, charset, mapping=None):
|
||||||
|
- n = {}
|
||||||
|
- for k, v in val.items():
|
||||||
|
- quoted = escape_item(v, charset, mapping)
|
||||||
|
- n[k] = quoted
|
||||||
|
- return n
|
||||||
|
+ raise TypeError("dict can not be used as parameter")
|
||||||
|
|
||||||
|
def escape_sequence(val, charset, mapping=None):
|
||||||
|
n = []
|
||||||
@ -1,12 +1,12 @@
|
|||||||
Name: python-PyMySQL
|
Name: python-PyMySQL
|
||||||
Version: 0.9.3
|
Version: 0.9.3
|
||||||
Release: 1
|
Release: 4
|
||||||
Summary: Pure Python MySQL Client
|
Summary: Pure Python MySQL Client
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/PyMySQL/
|
URL: https://pypi.python.org/pypi/PyMySQL/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/P/PyMySQL/PyMySQL-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/P/PyMySQL/PyMySQL-%{version}.tar.gz
|
||||||
|
Patch0: CVE-2024-36039.patch
|
||||||
|
|
||||||
BuildRequires: python2-cryptography python2-devel python2-setuptools
|
|
||||||
BuildRequires: python3-cryptography python3-devel python3-setuptools
|
BuildRequires: python3-cryptography python3-devel python3-setuptools
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -15,20 +15,6 @@ BuildArch: noarch
|
|||||||
This package contains a pure-Python MySQL client library, based on PEP 249.
|
This package contains a pure-Python MySQL client library, based on PEP 249.
|
||||||
Most public APIs are compatible with mysqlclient and MySQLdb.
|
Most public APIs are compatible with mysqlclient and MySQLdb.
|
||||||
|
|
||||||
NOTE: PyMySQL doesn't support low level APIs _mysql provides like data_seek,
|
|
||||||
store_result, and use_result. You should use high level APIs defined in PEP 249.
|
|
||||||
But some APIs like autocommit and ping are supported because PEP 249 doesn't
|
|
||||||
cover their usecase.
|
|
||||||
|
|
||||||
%package -n python2-PyMySQL
|
|
||||||
Summary: Pure Python2 MySQL Client
|
|
||||||
Requires: python2-cryptography
|
|
||||||
%{?python_provide:%python_provide python2-PyMySQL}
|
|
||||||
|
|
||||||
%description -n python2-PyMySQL
|
|
||||||
This package contains a pure-Python MySQL client library, based on PEP 249.
|
|
||||||
Most public APIs are compatible with mysqlclient and MySQLdb.
|
|
||||||
|
|
||||||
%package -n python3-PyMySQL
|
%package -n python3-PyMySQL
|
||||||
Summary: Pure Python3 MySQL client
|
Summary: Pure Python3 MySQL client
|
||||||
Requires: python3-cryptography
|
Requires: python3-cryptography
|
||||||
@ -43,19 +29,11 @@ Most public APIs are compatible with mysqlclient and MySQLdb.
|
|||||||
%autosetup -n PyMySQL-%{version} -p1
|
%autosetup -n PyMySQL-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-PyMySQL
|
|
||||||
%doc README.rst
|
|
||||||
%license LICENSE
|
|
||||||
%{python2_sitelib}/*
|
|
||||||
|
|
||||||
%files -n python3-PyMySQL
|
%files -n python3-PyMySQL
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -63,7 +41,19 @@ Most public APIs are compatible with mysqlclient and MySQLdb.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Jul Thu 16 2020 yanglongkang <yanglongkang@huawei.com> - 0.9.3-1
|
* Fri May 24 2024 wangkai <13474090681@163.com> - 0.9.3-4
|
||||||
|
- Fix CVE-2024-36039
|
||||||
|
|
||||||
|
* Wed Aug 25 2021 OpenStack_SIG <openstack@openeuler.org> - 0.9.3-3
|
||||||
|
- Revert the version to 0.9.3, because python3-aiomysql depends on the python-PyMySQL vertion ranging form 0.9 to 0.9.3
|
||||||
|
|
||||||
|
* Mon Aug 09 2021 OpenStack_SIG <openstack@openeuler.org> - 1.0.2-1
|
||||||
|
- Update version to 1.0.2, because of the dependence of Openstack Wallaby
|
||||||
|
|
||||||
|
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 0.9.3-2
|
||||||
|
- remove python2 dependency
|
||||||
|
|
||||||
|
* Thu Jul 16 2020 yanglongkang <yanglongkang@huawei.com> - 0.9.3-1
|
||||||
- update package to 0.9.3
|
- update package to 0.9.3
|
||||||
|
|
||||||
* Fri Feb 14 2020 hy-euler <eulerstoragemt@huawei.com> - 0.9.2-3
|
* Fri Feb 14 2020 hy-euler <eulerstoragemt@huawei.com> - 0.9.2-3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user