[Webkit-unassigned] [Bug 116096] DOMFileSystemBase: merge BlackBerry implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 23 09:03:18 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=116096





--- Comment #6 from Alberto Garcia <agarcia at igalia.com>  2013-05-23 09:01:47 PST ---
(In reply to comment #5)

Hey, sorry for the late reply.

> > The filesystem url is something like "filesystem:http://example.com/temporary/myfile.png", which is basically a wrapper. So url.path() is "http://example.com/temporary/myfile.png" and originalURL.path() is "/temporary/myfile.png"
> ParsedURLString should _ONLY_ be used if the input string was already parsed and canonicalized by KURL. Code like this is a great way to get security problems.

Sure I can change that, I wonder if we should double check SecurityOrigin::extractInnerURL() as well which seems to be a similar case?

> > Source/WebCore/Modules/filesystem/DOMFileSystemBase.cpp:100
> > +        path = path.substring(1);
> > +
> > +        if (path.startsWith(temporaryPathPrefix)) {
> > +            type = FileSystemTypeTemporary;
> > +            path = path.substring(temporaryPathPrefixLength);
> > +        } else if (path.startsWith(persistentPathPrefix)) {
> > +            type = FileSystemTypePersistent;
> > +            path = path.substring(persistentPathPrefixLength);
> > +        } else
> > +            return false;
>
> This is very inefficient code, I don't know if you care about performance here?

That I can also rework a bit.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list