Bug 146055 - URL: trim before scheme checks
Summary: URL: trim before scheme checks
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-17 05:03 PDT by Anne van Kesteren
Modified: 2023-04-05 09:58 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 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?)
Comment 1 Alexey Proskuryakov 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.
Comment 2 Darin Adler 2015-06-19 10:25:43 PDT
Yes, both these changes seem worthwhile.
Comment 3 Anne van Kesteren 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.