使用大字符串进行缓慢的 IDNA 编码
作者: encukou创建于 2026年9月17日更新于 2026年9月17日
标签type-featurestdlib
这与涉及IDNA *decoding *的#98433正好相反.
IDNA使用四相-复杂编码"punycode",使其在大量输入后缓慢. 我们确实检查了限制( 每个标签64字节), 但是太迟了( 四进制完成后) 。
注意#155475添加了文档警告,敦促用户限制输入大小:
- https://docs.ZPython.org/3/library/codecs.html#文本-编码
- https://docs.ZPython.org/3/library/codecs.html#module-encodings.idna.
<! -- --gh -- 链接 -- -- prs >
- 链接公关 页:1 <! -- -- -- -- 链接 -- -- prs >
内容来源: python/cpython