<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>159832</bug_id>
          
          <creation_ts>2016-07-15 14:00:13 -0700</creation_ts>
          <short_desc>CSP: Do not send report violation for policies that have hash but not &apos;unsafe-inline&apos;</short_desc>
          <delta_ts>2022-01-18 13:35:09 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>159841</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>pgriffis</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1211555</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-07-15 14:00:13 -0700</bug_when>
    <thetext>Suppose a page has the following markup:

...
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;script-src &apos;sha256-A&apos;&quot;&gt;
&lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;script-src &apos;unsafe-inline&apos;&quot;&gt;
&lt;/head&gt;
&lt;script&gt;/* A script whose CSP SHA is &apos;sha256-A&apos;. */&lt;/script&gt;
...

Then we should send exactly one CSP violation report that explains that the script was blocked because it violated the second CSP meta tag.

We should have similar behavior for policies that have hashes for style elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1831795</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Griffis">pgriffis</who>
    <bug_when>2022-01-18 13:35:09 -0800</bug_when>
    <thetext>Fixed by r288132</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>