Skip to content

Slow IDNA encoding with large strings #157675

Description

@encukou

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions