Bug 162023 - URLParser: Check for invalid characters in the host
Summary: URLParser: Check for invalid characters in the host
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-15 11:03 PDT by Alex Christensen
Modified: 2016-09-15 11:23 PDT (History)
0 users

See Also:


Attachments
Patch (2.76 KB, patch)
2016-09-15 11:04 PDT, Alex Christensen
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-09-15 11:03:00 PDT
URLParser: Check for invalid characters in the host
Comment 1 Alex Christensen 2016-09-15 11:04:33 PDT
Created attachment 288974 [details]
Patch
Comment 2 Alex Christensen 2016-09-15 11:23:22 PDT
Comment on attachment 288974 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=288974&action=review

> Source/WebCore/platform/URLParser.cpp:1579
> +            if (isInvalidDomainCharacter(*iterator))
> +                return false;
>              if (*iterator == ':')
>                  break;

The check for colon should come first.  The first colon means we are starting to parse the port.  This is covered by API tests.
Comment 3 Alex Christensen 2016-09-15 11:23:30 PDT
http://trac.webkit.org/changeset/205988