<?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>101264</bug_id>
          
          <creation_ts>2012-11-05 15:01:25 -0800</creation_ts>
          <short_desc>document.open should set the outgoing Referer</short_desc>
          <delta_ts>2013-04-04 17:02:34 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></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>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Brad Vogel">bradavogel</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>bradavogel</cc>
    
    <cc>wiebe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>758935</commentid>
    <comment_count>0</comment_count>
      <attachid>172412</attachid>
    <who name="Brad Vogel">bradavogel</who>
    <bug_when>2012-11-05 15:01:25 -0800</bug_when>
    <thetext>Created attachment 172412
repro case

Browsers tested:
Chrome Canary 25.0.1317.0 - FAIL
Webkit Nightly 6.0.2 (7536.26.17, 537+) - FAIL
Firefox 16.0.2 - PASS

Repro steps:
1) Run the attached test.html with the web inspector open.
2) Click the Network tab and click icon-gold.png.

Expected:
The HTTP REFERER header is sent when requesting the image.

Actual:
Notice that the HTTP REFERER header isn&apos;t sent when requesting the image. This is because the iframe doesn&apos;t have a &apos;src&apos; attribute. However, the iframe is created and written into by the parent page, so it should send the parent page&apos;s REFERER.

This breaks sites that need to use a local iframe to sandbox css styles, and that iframe also loads external content that relies on HTTP REFERER.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>760084</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-06 14:57:15 -0800</bug_when>
    <thetext>What is a &quot;local&quot; iframe?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>760096</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-06 15:10:46 -0800</bug_when>
    <thetext>I thought I checked all these cases and made us match Firefox, but it sounds like I missed this one.  Thanks for the report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>760112</commentid>
    <comment_count>3</comment_count>
    <who name="Brad Vogel">bradavogel</who>
    <bug_when>2012-11-06 15:28:08 -0800</bug_when>
    <thetext>&quot;Local iframe&quot;: an empty iframe without the &apos;src&apos; attribute. E.g.:
&lt;iframe&gt;&lt;/iframe&gt;
&lt;script&gt;
    var iframe = document.querySelector(&apos;iframe&apos;);
    iframe.open();
    iframe.write(&apos;content&apos;);
    iframe.close();
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>794753</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Wiebe">wiebe</who>
    <bug_when>2012-12-19 09:42:41 -0800</bug_when>
    <thetext>I can confirm that IE 9 and 10 also set the HTTP Referer header properly in this use case.

This is a particular problem for anyone using the WordPress Theme Customizer (which uses a src-less, dynamic iframe) in conjunction with any authenticated requests that rely on the Referer (eg Typekit) inside that iframe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>869468</commentid>
    <comment_count>5</comment_count>
    <who name="Brad Vogel">bradavogel</who>
    <bug_when>2013-04-04 17:02:34 -0700</bug_when>
    <thetext>Cross filed for Blink at https://code.google.com/p/chromium/issues/detail?id=226858</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>172412</attachid>
            <date>2012-11-05 15:01:25 -0800</date>
            <delta_ts>2012-11-05 15:01:25 -0800</delta_ts>
            <desc>repro case</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>447</size>
            <attacher name="Brad Vogel">bradavogel</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHNjcmlwdD4KICAgICAg
ICAgICAgd2luZG93Lm9ubG9hZCA9IGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICB2YXIgaWZy
YW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignaWZyYW1lJyk7CiAgICAgICAgICAgICAgICB2
YXIgZG9jID0gaWZyYW1lLmNvbnRlbnREb2N1bWVudDsKICAgICAgICAgICAgICAgIGRvYy5vcGVu
KCk7CiAgICAgICAgICAgICAgICBkb2Mud3JpdGUoJzxpbWcgc3JjPSJodHRwOi8vd3d3LndlYmtp
dC5vcmcvaW1hZ2VzL2ljb24tZ29sZC5wbmciPicpOwogICAgICAgICAgICAgICAgZG9jLmNsb3Nl
KCk7CiAgICAgICAgICAgIH0KICAgICAgICA8L3NjcmlwdD4KICAgIDwvaGVhZD4KICAgIDxib2R5
PgogICAgICAgIDxpZnJhbWU+PC9pZnJhbWU+CiAgICA8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>