Bug 159895 - Don't make a sandbox extension for the bundle path if there is no bundle
Summary: Don't make a sandbox extension for the bundle path if there is no bundle
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 13:38 PDT by Alex Christensen
Modified: 2016-07-18 17:52 PDT (History)
0 users

See Also:


Attachments
Patch (1.77 KB, patch)
2016-07-18 13:40 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (1.80 KB, patch)
2016-07-18 13:41 PDT, Alex Christensen
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-07-18 13:38:08 PDT
Don't make a sandbox extension for the bundle path if there is no bundle
Comment 1 Alex Christensen 2016-07-18 13:40:47 PDT
Created attachment 283922 [details]
Patch
Comment 2 Alex Christensen 2016-07-18 13:41:16 PDT
Created attachment 283923 [details]
Patch
Comment 3 Darin Adler 2016-07-18 14:32:48 PDT
Comment on attachment 283923 [details]
Patch

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

> Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:262
> +        return [[[NSBundle mainBundle] bundlePath] stringByStandardizingPath];

I think you meant to use the mainBundle local variable here rather than calling [NSBundle mainBundle] again.

> Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:263
> +    return emptyString();

I suggest doing early exit instead of nesting the success case inside an if statement.
Comment 4 Alex Christensen 2016-07-18 17:52:20 PDT
Comment on attachment 283923 [details]
Patch

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

> Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:261
> +    if ([mainBundle bundleIdentifier])

This did not fix the original problem.  I don't know if I'll land it.  This was returning true where I though it would not.