RESOLVED FIXED Bug 104365
Log to console when script is blocked by sandbox attributes.
https://bugs.webkit.org/show_bug.cgi?id=104365
Summary Log to console when script is blocked by sandbox attributes.
Mike West
Reported 2012-12-07 05:34:03 PST
Continuing to skim through the sandbox flags we're currently not logging. This touches the (only) call site which checks SandboxedScripts: ScriptControllerBase::canExecuteScript.
Attachments
Patch (9.41 KB, patch)
2012-12-07 05:36 PST, Mike West
no flags
Patch (16.53 KB, patch)
2012-12-07 07:47 PST, Mike West
no flags
Patch for landing (16.40 KB, patch)
2012-12-08 13:08 PST, Mike West
no flags
Patch (18.21 KB, patch)
2012-12-10 04:44 PST, Mike West
no flags
Mike West
Comment 1 2012-12-07 05:36:42 PST
WebKit Review Bot
Comment 2 2012-12-07 07:21:02 PST
Comment on attachment 178205 [details] Patch Attachment 178205 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15191256 New failing tests: http/tests/security/contentSecurityPolicy/sandbox-empty.html http/tests/security/isolatedWorld/sandboxed-iframe.html http/tests/security/contentSecurityPolicy/sandbox-in-http-header.html http/tests/security/sandbox-inherit-to-initial-document-2.html http/tests/security/contentSecurityPolicy/sandbox-invalid-header.html http/tests/security/contentSecurityPolicy/sandbox-empty-subframe.html http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control.html media/video-controls-no-scripting.html
Mike West
Comment 3 2012-12-07 07:47:58 PST
Mike West
Comment 4 2012-12-08 13:08:54 PST
Created attachment 178376 [details] Patch for landing
WebKit Review Bot
Comment 5 2012-12-08 17:55:10 PST
Comment on attachment 178376 [details] Patch for landing Clearing flags on attachment: 178376 Committed r137053: <http://trac.webkit.org/changeset/137053>
WebKit Review Bot
Comment 6 2012-12-08 17:55:14 PST
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 7 2012-12-09 01:27:21 PST
(In reply to comment #5) > (From update of attachment 178376 [details]) > Clearing flags on attachment: 178376 > > Committed r137053: <http://trac.webkit.org/changeset/137053> It broke the Parser/html-parser.html perf test. See the Qt perf bots for details
WebKit Review Bot
Comment 8 2012-12-09 01:48:51 PST
Re-opened since this is blocked by bug 104471
Ryosuke Niwa
Comment 9 2012-12-09 09:19:51 PST
The correct fix is to ignore "CONSOLE MESSAGE: Blocked script execution in 'html-parser.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.” in perf_test.py.
Mike West
Comment 10 2012-12-10 04:44:20 PST
Mike West
Comment 11 2012-12-10 04:45:31 PST
(In reply to comment #9) > The correct fix is to ignore "CONSOLE MESSAGE: Blocked script execution in 'html-parser.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.” in perf_test.py. Thanks, excellent tip. :) The attached patch adjusts perftest.py as you've suggested. The test passes locally, and I'm carrying over Ojan's r+. Still, I'd appreciate you taking a look before I land it, just to ensure I've skipped the warning in the right place.
Ryosuke Niwa
Comment 12 2012-12-10 09:49:41 PST
(In reply to comment #11) > (In reply to comment #9) > > The correct fix is to ignore "CONSOLE MESSAGE: Blocked script execution in 'html-parser.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.” in perf_test.py. > > Thanks, excellent tip. :) > > The attached patch adjusts perftest.py as you've suggested. The test passes locally, and I'm carrying over Ojan's r+. Still, I'd appreciate you taking a look before I land it, just to ensure I've skipped the warning in the right place. Change looks right.
Mike West
Comment 13 2012-12-10 10:02:19 PST
Comment on attachment 178520 [details] Patch Thanks for taking a look.
WebKit Review Bot
Comment 14 2012-12-10 10:43:46 PST
Comment on attachment 178520 [details] Patch Clearing flags on attachment: 178520 Committed r137180: <http://trac.webkit.org/changeset/137180>
WebKit Review Bot
Comment 15 2012-12-10 10:43:50 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.