[CVE-2022-45061] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99232) 66/294566/1
authorJinWang An <jinwang.an@samsung.com>
Wed, 21 Jun 2023 07:46:23 +0000 (16:46 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 21 Jun 2023 07:46:23 +0000 (16:46 +0900)
commitbc91b0b8eb859f7d7286c7adeaa8fa6abcf88b03
tree9a47a2eb31ebbd3a1ee08df9055782777aad05d5
parentdee873ff8d2d8e5c71a02060abf635706e991234
[CVE-2022-45061] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99232)

From b0b590be9597fd5919228d251812dd54145f70a7 Mon Sep 17 00:00:00 2001
From: "Miss Islington (bot)"
 <31488909+miss-islington@users.noreply.github.com>
Date: Mon, 7 Nov 2022 19:22:14 -0800

There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

(cherry picked from commit a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Change-Id: I9a1277f3b3c6d07f04787402400a859a015fab21
Signed-off-by: JinWang An <jinwang.an@samsung.com>
Lib/encodings/idna.py
Lib/test/test_codecs.py