Bug 75701 - EntryBase::toURL produces wrong URL if path contains special characters
Summary: EntryBase::toURL produces wrong URL if path contains special characters
Status: RESOLVED DUPLICATE of bug 75049
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified All
: P2 Normal
Assignee: Sergey Ryazanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-06 06:04 PST by Sergey Ryazanov
Modified: 2012-04-20 05:02 PDT (History)
1 user (show)

See Also:


Attachments
Patch (8.32 KB, patch)
2012-01-07 04:35 PST, Sergey Ryazanov
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Ryazanov 2012-01-06 06:04:35 PST
If file name of path contains '#' or '%xx' they get to the URL unescaped. Such an URL doesn't work in XMLHttpRequest or as source of IMG element.

String EntryBase::toURL() has its own code what duplicated AsyncFileSystemChromium::virtualPathToFileSystemURL.
Comment 1 Sergey Ryazanov 2012-01-07 04:35:24 PST
Created attachment 121548 [details]
Patch
Comment 2 Eric U. 2012-01-09 11:12:16 PST
Comment on attachment 121548 [details]
Patch

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

> Source/WebCore/fileapi/EntryBase.cpp:59
> +    return m_fileSystem->toURL(this);

While this makes the code here smaller, it forces all implementers to basically write the same code.
All that's really missing here is proper escaping of the path.  See https://bugs.webkit.org/show_bug.cgi?id=75049 for the soon-to-be-checked-in fix.
Comment 3 Eric Seidel (no email) 2012-04-19 15:20:25 PDT
Comment on attachment 121548 [details]
Patch

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

ericu seems to be tryign to r- this. :)  I'll help him.

> Source/WebCore/ChangeLog:8
> +        No new tests. (OOPS!)

This will fail teh commit-queue.
Comment 4 Sergey Ryazanov 2012-04-20 05:02:19 PDT

*** This bug has been marked as a duplicate of bug 75049 ***