<?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>153148</bug_id>
          
          <creation_ts>2016-01-15 14:44:41 -0800</creation_ts>
          <short_desc>CSP: &apos;eval()&apos; blocked in report-only mode should send a violation report</short_desc>
          <delta_ts>2018-06-13 21:55:53 -0700</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>DUPLICATE</resolution>
          <dup_id>111869</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Daniel Bates">dbates</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>dbates</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1155948</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-01-15 14:44:41 -0800</bug_when>
    <thetext>We should merge &lt;https://src.chromium.org/viewvc/blink?view=rev&amp;revision=155752&gt;.

CSP: &apos;eval()&apos; blocked in report-only mode should send a violation report.

Currently, &apos;eval()&apos; is blocked inside V8 when an enforce-mode Content
Security Policy is specified for a document. Report-only policies don&apos;t
trigger this mechanism, and therefore can deliver violation reports
neither to the &apos;report-uri&apos; in the policy nor the console.

This patch changes ContentSecurityPolicy::didReceiveHeader to disable
eval inside V8 for report-only policies as well, and relies on the
V8Initializer::codeGenerationCheckCallbackInMainThread callback to give
V8 the final go/no-go decision regarding the code&apos;s execution.

This patch has the negative performance side-effect of calling back from
V8 to core whenever &apos;eval()&apos; is encountered on a page with an CSP that
blocks eval. Given that the page isn&apos;t expecting to run &apos;eval()&apos; at all, that
impact seems like something we can live with (though it is fairly
significant).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1159596</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-01-27 20:29:35 -0800</bug_when>
    <thetext>&lt;rdar://problem/24383146&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432927</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-06-13 21:55:53 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 111869 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>