-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Slow IDNA encoding with large strings #157675
Copy link
Copy link
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsNo status
This is the opposite of #98433 which concerned IDNA decoding.
IDNA uses the quadratic-complexity codec
punycode, making it slow with large inputs.We do check the limit (64 bytes per label), but too late (after the quadratic step is done).
Note that #155475 added documentation warnings, urging users to limit the input size:
Linked PRs