Apply CSP default-src hash values to script-src and style-src.

This fixes a minor bug where we forgot to add hash values in the
default-src CSP directive to the list of hash algorithms seen. Thus,
when the hash whitelist was checked for inline styles and scripts, the
CSP potentially might believe that no algorithms have been seen, so the
whitelist check would skip all of the stored hash values.

This fixes the bug by adding the algorithms to the list of algorithms
seen when a default-src directive is reached.

BUG=534568
R=mkwst@chromium.org

Review URL: https://codereview.chromium.org/1360693002

git-svn-id: svn://svn.chromium.org/blink/trunk@202656 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: f7c73c3ba93206432413230470a55e8c0b34a292
  1. third_party/