Bug 76234 - NSURL to KURL conversion shouldn't turn raw paths into file URLs
Summary: NSURL to KURL conversion shouldn't turn raw paths into file URLs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on: 78280
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-12 17:19 PST by Alexey Proskuryakov
Modified: 2012-02-09 13:41 PST (History)
2 users (show)

See Also:


Attachments
proposed patch (1.59 KB, patch)
2012-01-12 17:22 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-01-12 17:19:24 PST
This creates ways for strings that didn't look like file URLs at first to become file URLs after security checks have cleared them.

I tracked the origins of this code to <http://trac.webkit.org/changeset/4662>. It's not clear if there was any reason for doing this - I couldn't find any evidence of any Foundation or AppKit methods doing much with such NSURLs.
Comment 1 Alexey Proskuryakov 2012-01-12 17:22:00 PST
Created attachment 122345 [details]
proposed patch

I suggest waiting to see if any non-Safari clients break because of this. We can then add more relaxed conversion for APIs that are used this way.
Comment 2 Darin Adler 2012-01-12 17:25:44 PST
Comment on attachment 122345 [details]
proposed patch

Seems good to do this. I agree we can add code to add "file:" prefix in the WebKit level later if we find we need it for compatibility.
Comment 3 Alexey Proskuryakov 2012-01-12 17:27:47 PST
Committed <http://trac.webkit.org/changeset/104885>.
Comment 4 Alexey Proskuryakov 2012-01-13 00:12:24 PST
Forgot about matching CF code. Filed bug 76251 about it.