You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
idna incremental decoder decodes dots twice after leading empty labels #161102
The incremental decoder of the idna codec counts the dot before a label as consumed only if the labels before it were non-empty. After leading empty labels it returns the dot as text but leaves it in its buffer, so the next call decodes it again.
Expected '.example.com' and 1000, as bytes.decode("idna") gives. Bytes also remain in the decoder after final=True, and the UnicodeDecodeError position for an invalid label after the first is one less than the one-shot decoder reports.
Activity
gh-161102: Fix idna incremental decoder after leading empty labels (G…
[3.14] gh-161102: Fix idna incremental decoder after leading empty la…
[3.15] gh-161102: Fix idna incremental decoder after leading empty la…