Projects
Mega:24.03
python-idna
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 6
View file
_service:tar_scm:python-idna.spec
Changed
@@ -1,13 +1,14 @@ %global _empty_manifest_terminate_build 0 Name: python-idna Version: 3.6 -Release: 2 +Release: 3 Summary: Internationalized Domain Names in Applications (IDNA) License: BSD URL: https://github.com/kjd/idna Source0: https://github.com/kjd/idna/archive/refs/tags/idna-3.6.tar.gz BuildArch: noarch +Patch6000: backport-CVE-2024-3651.patch %description A library to support the Internationalised Domain Names in @@ -44,7 +45,7 @@ results from the earlier standard from 2003. %prep -%autosetup -n idna-%{version} +%autosetup -n idna-%{version} -p1 %build %pyproject_build @@ -88,6 +89,9 @@ %{_docdir}/* %changelog +* Sat Apr 20 2024 zhangpan <zhangpan103@h-partners.com> - 3.6-3 +- fix CVE-2024-3651 + * Sat Apr 20 2024 zhangpan <zhangpan103@h-partners.com> - 3.6-2 - correct the tar package
View file
_service:tar_scm:backport-CVE-2024-3651.patch
Added
@@ -0,0 +1,2489 @@ +From 5beb28b9dd77912c0dd656d8b0fdba3eb80222e7 Mon Sep 17 00:00:00 2001 +From: Kim Davies <kim@cynosure.com.au> +Date: Mon, 1 Apr 2024 20:24:57 -0700 +Subject: PATCH More efficient resolution of joiner contexts + +In some pathological cases, this would out eligibility under +CONTEXTJ rules much faster. + +Reference:https://github.com/kjd/idna/commit/5beb28b9dd77912c0dd656d8b0fdba3eb80222e7 +Conflict:NA + +--- + idna/core.py | 16 +- + idna/idnadata.py | 2197 ++++++++++++++++++++++++++++++++++++++++++++-- + tools/idna-data | 13 +- + 3 files changed, 2164 insertions(+), 62 deletions(-) + +diff --git a/idna/core.py b/idna/core.py +index aaf7d65..a90bc69 100644 +--- a/idna/core.py ++++ b/idna/core.py +@@ -150,9 +150,11 @@ def valid_contextj(label: str, pos: int) -> bool: + joining_type = idnadata.joining_types.get(ord(labeli)) + if joining_type == ord('T'): + continue +- if joining_type in ord('L'), ord('D'): ++ elif joining_type in ord('L'), ord('D'): + ok = True + break ++ else: ++ break + + if not ok: + return False +@@ -162,9 +164,11 @@ def valid_contextj(label: str, pos: int) -> bool: + joining_type = idnadata.joining_types.get(ord(labeli)) + if joining_type == ord('T'): + continue +- if joining_type in ord('R'), ord('D'): ++ elif joining_type in ord('R'), ord('D'): + ok = True + break ++ else: ++ break + return ok + + if cp_value == 0x200d: +@@ -236,12 +240,8 @@ def check_label(label: Unionstr, bytes, bytearray) -> None: + if intranges_contain(cp_value, idnadata.codepoint_classes'PVALID'): + continue + elif intranges_contain(cp_value, idnadata.codepoint_classes'CONTEXTJ'): +- try: +- if not valid_contextj(label, pos): +- raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format( +- _unot(cp_value), pos+1, repr(label))) +- except ValueError: +- raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format( ++ if not valid_contextj(label, pos): ++ raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format( + _unot(cp_value), pos+1, repr(label))) + elif intranges_contain(cp_value, idnadata.codepoint_classes'CONTEXTO'): + if not valid_contexto(label, pos): +diff --git a/idna/idnadata.py b/idna/idnadata.py +index 5cd05d9..c61dcf9 100644 +--- a/idna/idnadata.py ++++ b/idna/idnadata.py +@@ -101,16 +101,190 @@ + ), + } + joining_types = { +- 0x600: 85, +- 0x601: 85, +- 0x602: 85, +- 0x603: 85, +- 0x604: 85, +- 0x605: 85, +- 0x608: 85, +- 0x60b: 85, ++ 0xad: 84, ++ 0x300: 84, ++ 0x301: 84, ++ 0x302: 84, ++ 0x303: 84, ++ 0x304: 84, ++ 0x305: 84, ++ 0x306: 84, ++ 0x307: 84, ++ 0x308: 84, ++ 0x309: 84, ++ 0x30a: 84, ++ 0x30b: 84, ++ 0x30c: 84, ++ 0x30d: 84, ++ 0x30e: 84, ++ 0x30f: 84, ++ 0x310: 84, ++ 0x311: 84, ++ 0x312: 84, ++ 0x313: 84, ++ 0x314: 84, ++ 0x315: 84, ++ 0x316: 84, ++ 0x317: 84, ++ 0x318: 84, ++ 0x319: 84, ++ 0x31a: 84, ++ 0x31b: 84, ++ 0x31c: 84, ++ 0x31d: 84, ++ 0x31e: 84, ++ 0x31f: 84, ++ 0x320: 84, ++ 0x321: 84, ++ 0x322: 84, ++ 0x323: 84, ++ 0x324: 84, ++ 0x325: 84, ++ 0x326: 84, ++ 0x327: 84, ++ 0x328: 84, ++ 0x329: 84, ++ 0x32a: 84, ++ 0x32b: 84, ++ 0x32c: 84, ++ 0x32d: 84, ++ 0x32e: 84, ++ 0x32f: 84, ++ 0x330: 84, ++ 0x331: 84, ++ 0x332: 84, ++ 0x333: 84, ++ 0x334: 84, ++ 0x335: 84, ++ 0x336: 84, ++ 0x337: 84, ++ 0x338: 84, ++ 0x339: 84, ++ 0x33a: 84, ++ 0x33b: 84, ++ 0x33c: 84, ++ 0x33d: 84, ++ 0x33e: 84, ++ 0x33f: 84, ++ 0x340: 84, ++ 0x341: 84, ++ 0x342: 84, ++ 0x343: 84, ++ 0x344: 84, ++ 0x345: 84, ++ 0x346: 84, ++ 0x347: 84, ++ 0x348: 84, ++ 0x349: 84, ++ 0x34a: 84, ++ 0x34b: 84, ++ 0x34c: 84, ++ 0x34d: 84, ++ 0x34e: 84, ++ 0x34f: 84, ++ 0x350: 84, ++ 0x351: 84, ++ 0x352: 84, ++ 0x353: 84, ++ 0x354: 84, ++ 0x355: 84, ++ 0x356: 84, ++ 0x357: 84, ++ 0x358: 84, ++ 0x359: 84, ++ 0x35a: 84, ++ 0x35b: 84, ++ 0x35c: 84, ++ 0x35d: 84, ++ 0x35e: 84, ++ 0x35f: 84, ++ 0x360: 84, ++ 0x361: 84, ++ 0x362: 84, ++ 0x363: 84, ++ 0x364: 84, ++ 0x365: 84, ++ 0x366: 84, ++ 0x367: 84, ++ 0x368: 84, ++ 0x369: 84, ++ 0x36a: 84, ++ 0x36b: 84, ++ 0x36c: 84, ++ 0x36d: 84, ++ 0x36e: 84, ++ 0x36f: 84, ++ 0x483: 84, ++ 0x484: 84, ++ 0x485: 84, ++ 0x486: 84, ++ 0x487: 84, ++ 0x488: 84, ++ 0x489: 84, ++ 0x591: 84,
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2