Bug 167330 - URLParser should fail to parse percent-encoded invalid UTF-8 sequences
Summary: URLParser should fail to parse percent-encoded invalid UTF-8 sequences
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:
: 167730 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-23 15:16 PST by Alex Christensen
Modified: 2017-02-02 11:06 PST (History)
1 user (show)

See Also:


Attachments
Patch (3.77 KB, patch)
2017-01-23 15:21 PST, 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 2017-01-23 15:16:16 PST
URLParser should fail to parse percent-encoded invalid UTF-8 sequences
Comment 1 Alex Christensen 2017-01-23 15:21:52 PST
Created attachment 299547 [details]
Patch
Comment 2 Alex Christensen 2017-01-23 15:28:22 PST
http://trac.webkit.org/r211067
Comment 3 Darin Adler 2017-01-23 18:00:47 PST
Comment on attachment 299547 [details]
Patch

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

> Source/WebCore/platform/URLParser.cpp:2465
>  ALWAYS_INLINE static bool containsOnlyASCII(const String& string)

Why does URLParser have its own version of this function? Shouldn’t we put this into WTF?

> Source/WebCore/platform/URLParser.cpp:2467
> +    ASSERT(!string.isNull());

Why?
Comment 4 Alex Christensen 2017-01-23 18:03:27 PST
Comment on attachment 299547 [details]
Patch

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

>> Source/WebCore/platform/URLParser.cpp:2465
>>  ALWAYS_INLINE static bool containsOnlyASCII(const String& string)
> 
> Why does URLParser have its own version of this function? Shouldn’t we put this into WTF?

probably.

>> Source/WebCore/platform/URLParser.cpp:2467
>> +    ASSERT(!string.isNull());
> 
> Why?

I just made it so that the one caller of this function can't call it with a null String.  If we put this in WTF, that won't necessarily be true.
Comment 5 Alexey Proskuryakov 2017-02-02 11:06:54 PST
*** Bug 167730 has been marked as a duplicate of this bug. ***