Bug 146055

Summary: URL: trim before scheme checks
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ap, beidson, cdumez, darin, eoconnor, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Anne van Kesteren
Reported 2015-06-17 05:03:00 PDT
The backslash replacement in https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/URL.cpp#L470 should happen after the C0 controls and space removal at https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/URL.cpp#L492 because otherwise e.g. " data:\" turns into "data:/" which does not seem desired. (I was also wondering if we could limit the backslash replacement to only the special schemes: http/https/ftp/gopher/file/ws/wss?)
Attachments
Alexey Proskuryakov
Comment 1 2015-06-18 09:14:13 PDT
Thank you, good catch! > (I was also wondering if we could limit the backslash replacement to only the special schemes: http/https/ftp/gopher/file/ws/wss?) Wait, so we perform backslash replacement for custom protocols? That seems crazy, hopefully no clients rely on that.
Darin Adler
Comment 2 2015-06-19 10:25:43 PDT
Yes, both these changes seem worthwhile.
Anne van Kesteren
Comment 3 2023-04-05 09:58:02 PDT
All this code changed due to the URL rewrite. And we match the standard except for a couple known cases.
Note You need to log in before you can comment on or make changes to this bug.