Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
de70261ab0
!25 [sync] PR-24: fix CVE-2023-26112
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-09-19 06:32:32 +00:00
Wang_M
689f04c288 fix CVE-2023-26112
(cherry picked from commit 14cd53cd73b776a57cffed5c0038bcd964d7d26b)
2024-09-18 09:12:06 +08:00
openeuler-ci-bot
4704e0a6b6
!20 [sync] PR-17: update the introduction web link
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2023-05-13 02:33:49 +00:00
Jiangtian Feng
5f16530101 update the introduction web link
Signed-off-by: Jiangtian Feng <fengjiangtian@huawei.com>
(cherry picked from commit ec9194389b325e748d08c6e758332cd44cac172d)
2023-05-13 09:42:28 +08:00
openeuler-ci-bot
30b9d266c5
!16 [sync] PR-14: add the missing date in spec file changelog
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-10-21 09:16:27 +00:00
liubo
5c98eb76fe python-configobj: add the missing date in spec file
Signed-off-by: liubo <liubo254@huawei.com>
(cherry picked from commit 7edf25e580889b3a25f2318fa323c6b81596719b)
2022-10-21 15:50:31 +08:00
openeuler-ci-bot
3eb723a426
!13 [sync] PR-11: rebuild the version to 5.0.6 - 18
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-10-21 07:25:44 +00:00
liubo
f97f8a80d6 python-configobj: rebuild the version to 5.0.6 - 18
Signed-off-by: liubo <liubo254@huawei.com>
(cherry picked from commit 06408cc4351fa7c1036c0c995329ed96bbce79f1)
2022-10-21 14:56:12 +08:00
openeuler-ci-bot
0984ba231d !5 python-configobj delete -Sgit from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
2021-07-31 07:37:09 +00:00
chenyanpanHW
bfa8ccb916
delete -Sgit from %autosetup, and delete BuildRequires git 2021-07-30 23:21:36 +08:00
3 changed files with 95 additions and 3 deletions

View File

@ -0,0 +1,26 @@
From fb33cc3bc886eec21f56309346076069f0a2bcb5 Mon Sep 17 00:00:00 2001
From: Rob Dennis <robd@services-in.xr>
Date: Tue, 17 Jan 2023 14:35:53 -0500
Subject: [PATCH] #225 - changed 1 link in rest docs
- there's a _lot_ of references to voidspace and I felt unable to change all of them
---
docs/configobj.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/configobj.rst b/docs/configobj.rst
index c4bbc18..6477b7b 100644
--- a/docs/configobj.rst
+++ b/docs/configobj.rst
@@ -32,7 +32,7 @@
The best introduction to working with ConfigObj, including the powerful configuration validation system,
is the article:
- * `An Introduction to ConfigObj <http://www.voidspace.org.uk/python/articles/configobj.shtml>`_
+ * `An Introduction to ConfigObj <https://web.archive.org/web/20200503085339/http://www.voidspace.org.uk/python/articles/configobj.shtml>`_
Introduction
--
2.27.0

View File

@ -0,0 +1,51 @@
From a82ea8fb0338f2bd46cf627c4b763094448e6bd7 Mon Sep 17 00:00:00 2001
From: cdcadman <mythirty@gmail.com>
Date: Wed, 17 May 2023 03:57:08 -0700
Subject: [PATCH] Address CVE-2023-26112 ReDoS
---
src/configobj/validate.py | 2 +-
src/tests/test_validate_errors.py | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/validate.py b/validate.py
index 9267a3f..98d879f 100644
--- a/validate.py
+++ b/validate.py
@@ -541,7 +541,7 @@ class Validator(object):
"""
# this regex does the initial parsing of the checks
- _func_re = re.compile(r'(.+?)\((.*)\)', re.DOTALL)
+ _func_re = re.compile(r'([^\(\)]+?)\((.*)\)', re.DOTALL)
# this regex takes apart keyword arguments
_key_arg = re.compile(r'^([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*)$', re.DOTALL)
diff --git a/tests/test_validate_errors.py b/tests/test_validate_errors.py
index 399daa8..f7d6c27 100644
--- a/tests/test_validate_errors.py
+++ b/tests/test_validate_errors.py
@@ -3,7 +3,7 @@ import os
import pytest
from configobj import ConfigObj, get_extra_values, ParseError, NestingError
-from validate import Validator
+from validate import Validator, VdtUnknownCheckError
@pytest.fixture()
def thisdir():
@@ -77,3 +77,11 @@ def test_no_parent(tmpdir, specpath):
ini.write('[[haha]]')
with pytest.raises(NestingError):
conf = ConfigObj(str(ini), configspec=specpath, file_error=True)
+
+
+def test_re_dos(val):
+ value = "aaa"
+ i = 165100
+ attack = '\x00'*i + ')' + '('*i
+ with pytest.raises(VdtUnknownCheckError):
+ val.check(attack, value)
--
2.40.1

View File

@ -2,13 +2,16 @@
Name: python-configobj Name: python-configobj
Version: 5.0.6 Version: 5.0.6
Release: 16 Release: 20
Summary: ConfigObj is a simple but powerful config file reader and writer Summary: ConfigObj is a simple but powerful config file reader and writer
License: BSD License: BSD
URL: http://configobj.readthedocs.org/ URL: http://configobj.readthedocs.org/
Source0: https://github.com/DiffSK/configobj/archive/v%{version}.tar.gz Source0: https://github.com/DiffSK/configobj/archive/v%{version}.tar.gz
BuildRequires:python3-devel python3-pytest python3-setuptools python3-six git Patch0: 0001-changed-1-link-in-rest-docs.patch
Patch1: 0002-Address-CVE-2023-26112-ReDoS.patch
BuildRequires:python3-devel python3-pytest python3-setuptools python3-six
BuildArch: noarch BuildArch: noarch
%description %description
@ -38,7 +41,7 @@ Requires: python3-six
config file reader and writer config file reader and writer
%prep %prep
%autosetup -n configobj-%{version} -p1 -Sgit %autosetup -n configobj-%{version} -p1
%build %build
%py3_build %py3_build
@ -56,6 +59,18 @@ export PYTHONWARNINGS=always
%{python3_sitelib}/* %{python3_sitelib}/*
%changelog %changelog
* Sat Sep 14 2024 Wangmian <wangmian19@h-partners.com> - 5.0.6-20
- fix CVE-2023-26112 from fedora
* Mon May 8 2023 Jiangtian Feng <fengjiangtian@huawei.com> - 5.0.6-19
- update the introduction web link
* Fri Oct 21 2022 liubo <liubo254@huawei.com> - 5.0.6-18
- rebuild the version to 5.0.6-18
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 5.0.6-17
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 5.0.6-16 * Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 5.0.6-16
- remove python2 dependency - remove python2 dependency