[wp-trac] [WordPress Trac] #62568: MAX_LENGTH = 64 in /wp-includes/Requests/src/IdnaEncoder.php is too restrictive for modern URL use cases.
WordPress Trac
noreply at wordpress.org
Tue Nov 26 14:34:14 UTC 2024
#62568: MAX_LENGTH = 64 in /wp-includes/Requests/src/IdnaEncoder.php is too
restrictive for modern URL use cases.
-------------------------+------------------------------
Reporter: knufflpuffl | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Charset | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by siliconforks):
The comments for the `IdnaEncoder::to_ascii()` method and the
`IdnaEncoder::MAX_LENGTH` constant are not very clear, but I don't think
the intention is that an entire URL can be passed to the `to_ascii()`
method. It's just for domain names. But I don't even think it's allowed
to pass an entire domain name to the `to_ascii()` method. You have to
break the domain name up into its component parts (these are usually
called "labels" in standards documents) and those are what can be passed
to `to_ascii()`.
I think you can pass an entire domain name (but not an entire URL) to the
`IdnaEncoder::encode()` method.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62568#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list