[webkit-reviews] review granted: [Bug 226912] Check for "xn--" in any subdomain when parsing URL hosts : [Attachment 431360] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 15 08:49:26 PDT 2021
Darin Adler <darin at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 226912: Check for "xn--" in any subdomain when parsing URL hosts
https://bugs.webkit.org/show_bug.cgi?id=226912
Attachment 431360: Patch
https://bugs.webkit.org/attachment.cgi?id=431360&action=review
--- Comment #14 from Darin Adler <darin at apple.com> ---
Comment on attachment 431360
--> https://bugs.webkit.org/attachment.cgi?id=431360
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=431360&action=review
> Source/WTF/wtf/URL.cpp:-406
> - // For host names bigger than this, we won't do IDN encoding, which is
almost certainly OK.
I feel like it’s a problem to lose this comment. Could write a better one, but
just removing it seems wrong.
Without the comment it’s not obvious why it’s OK to leave the hostname as-is
when it’s super long, and the check just below is mysterious.
> Source/WTF/wtf/URLHelpers.cpp:-43
> -// For host names bigger than this, we won't do IDN encoding, which is
almost certainly OK.
Again, losing this comment.
> Source/WTF/wtf/URLHelpers.cpp:575
> + if (hostName.length() > URLParser::hostnameBufferLength)
Mysterious code without a comment. Why is it safe to just do nothing for long
strings.
More information about the webkit-reviews
mailing list