[3.8] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) by miss-islington · Pull Request #99231 · python/cpython

@miss-islington

@miss-islington @gpshead

) (pythonGH-99222)

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

(cherry picked from commit d315722)

(cherry picked from commit a6f6c3a)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>

@gpshead gpshead changed the title [3.8] [3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) [3.8] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222)

Nov 8, 2022

gpshead

@miss-islington

Sorry, I can't merge this PR. Reason: You're not authorized to push to this branch. Visit https://docs.github.com/articles/about-protected-branches/ for more information..

vstinner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@vstinner

@ambv: Would you mind to merge this security fix? It's already in other branches, including 3.7 ;-)

@ngie-eign

@ambv : is there a plan for when the next 3.8 release might be cut? I noticed that this item wasn't in .15; Blackduck is already citing this as an issue, so the need for resolving this in cpython and trickling the fix down will need to come sooner rather than later.

@gpshead

Release manager conversations recently suggest they'll be coordinating releases for the week of December 5th.