Bug 54154 - File uploads do not work within the sandbox
Summary: File uploads do not work within the sandbox
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-02-09 16:55 PST by Sam Weinig
Modified: 2011-02-09 17:18 PST (History)
0 users

See Also:


Attachments
Patch (3.80 KB, patch)
2011-02-09 16:57 PST, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2011-02-09 16:55:34 PST
File uploads do not work within the sandbox
Comment 1 Sam Weinig 2011-02-09 16:57:49 PST
Created attachment 81895 [details]
Patch
Comment 2 Darin Adler 2011-02-09 17:00:51 PST
Comment on attachment 81895 [details]
Patch

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

> Source/WebKit2/UIProcess/WebPageProxy.cpp:2124
> +        SandboxExtension::Handle sandboxExtensionHandle;
> +        SandboxExtension::createHandle(fileURLs[i], SandboxExtension::ReadOnly, sandboxExtensionHandle);

Why does this use an out argument instead of a return value?

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1561
> +    RefPtr<SandboxExtension> extension = SandboxExtension::create(handle);
> +    extension->consumePermanently();

No need for a local variable here.
Comment 3 Sam Weinig 2011-02-09 17:18:18 PST
Fixed in http://trac.webkit.org/changeset/78163.