<?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>70463</bug_id>
          
          <creation_ts>2011-10-19 17:46:18 -0700</creation_ts>
          <short_desc>CSP blocks src-less plugins when enabled</short_desc>
          <delta_ts>2012-01-18 23:18:00 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>71426</dup_id>
          
          <bug_file_loc>http://davidben.net/csp-test.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>53572</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="David Benjamin">davidben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>487181</commentid>
    <comment_count>0</comment_count>
    <who name="David Benjamin">davidben</who>
    <bug_when>2011-10-19 17:46:18 -0700</bug_when>
    <thetext>Having a Content-Security-Policy enabled blocks &lt;embed&gt; tags without a src attribute. I&apos;ve put together a quick test case at

http://davidben.net/csp-test.html

It sends &quot;default-src &apos;self&apos;&quot; on both X-WebKit-CSP and X-Content-Security-Policy. The contents are a Flash applet with no src and an image from another site just to make sure CSP is working at all. In the latest Chromium nightly, both are blocked and I get

  Refused to load object from &apos;&apos; because of Content-Security-Policy.

in the console. In Firefox only the image is blocked, and I get an (uninteresting) Flash applet. But Flash does still load. I think it makes more sense for CSP not to trigger here since nothing from another origin is actually being loaded (and this block can be circumvented by putting in a dummy src from the same origin anyway). This is particularly relevant if I want to turn on CSP for a Chrome extension that embeds an NPAPI plugin into the background page; they&apos;re often src-less, including in the example.

http://code.google.com/chrome/extensions/npapi.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>487334</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-10-19 22:23:22 -0700</bug_when>
    <thetext>There was a thread about this on the public-web-security mailing list.  There wasn&apos;t a clear resolution about what to do with URL-less plugins.  My sense is that they should be treated as having the URL of the enclosing page, which would let you block them with &apos;none&apos; for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>538505</commentid>
    <comment_count>2</comment_count>
    <who name="David Benjamin">davidben</who>
    <bug_when>2012-01-18 23:18:00 -0800</bug_when>
    <thetext>Looks like this got tracked elsewhere and fixed.

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

    </bug>

</bugzilla>