This repository has been archived by the owner on Dec 3, 2019. It is now read-only.
mirrored from https://chromium.googlesource.com/catapult
-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overwrite the 'Content-Security-Policy' header in WPR replay.
Some html files have a 'Content-Security-Policy' header that blocks execution of JavaScript from untrusted sources, including inline JavaScripts. WPR injects JavaScript snippets as inline JavaScript inside html files. So a restrictive 'Content-Security-Policy' can block a page from executing WPR injected script. The fix is tokenize a file's 'Content-Security-Policy' header, remove any tokens that prevents inline JavaScript execution, and add a 'unsafe-inline' token that opens the permission for a page to execute inline scripts. The Autofill Captured Sites Automation Framework requires this fix, as the framework relies on injected scripts to drive automation on captured sites. Bug: catapult:#1234 Chromium Bug: 850768 Change-Id: I9058c0722c14d1b5ea817b0db22ae603f464fde2 Reviewed-on: https://chromium-review.googlesource.com/c/1220886 Reviewed-by: Ned Nguyen <nednguyen@google.com> Commit-Queue: Yiming Zhou <uwyiming@google.com>
- Loading branch information
Yiming Zhou
authored and
Commit Bot
committed
Oct 4, 2018
1 parent
e3b37a4
commit 1b6e81b
Showing
3 changed files
with
154 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters