<?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>26868</bug_id>
          
          <creation_ts>2009-06-30 15:28:53 -0700</creation_ts>
          <short_desc>EventConstructor is being shared between documents</short_desc>
          <delta_ts>2012-05-10 08:15:58 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Security</product>
          <component>Security</component>
          <version>525.x (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://gf3.ca/safari_scope/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gianni Chiappetta">gianni</reporter>
          <assigned_to name="WebKit Security Group">webkit-security-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>eric</cc>
    
    <cc>gianni</cc>
    
    <cc>mjs</cc>
    
    <cc>sam</cc>
    
    <cc>yong.li.webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>129195</commentid>
    <comment_count>0</comment_count>
    <who name="Gianni Chiappetta">gianni</who>
    <bug_when>2009-06-30 15:28:53 -0700</bug_when>
    <thetext>It seems as if the EventConstructor object is being shared between document scopes, which leads to conflicts when dealing with cross-frame events.


Reproduce
---------
Compare the Event object between parent and child documents.

I&apos;ve created a test case in the URL attached. There are three assert statements, the assert on the Event object fails in Safari 4.

Weirdly enough, if you retrieve the objects via eval on each of the contexts, they return the expected results (thanks to tfluehr for noticing that one).


Actual Results
-----------
Both references are, in fact, the same object.


Expected Results
-------------
Each reference should refer to a different object relating to the scope of the document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129202</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-06-30 15:54:48 -0700</bug_when>
    <thetext>This sounds like it might be exploitable.  We need a better testing plan for finding these kinds of bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>142942</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-08-26 13:02:50 -0700</bug_when>
    <thetext>&lt;rdar://problem/7172579&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143038</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-08-26 20:40:40 -0700</bug_when>
    <thetext>I bet Eric fixed this as part of his grand cleanup of wrapper constructors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145457</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2009-09-08 11:09:10 -0700</bug_when>
    <thetext>The test case is no longer reachable.  Can you upload one to the bug if this still manifests?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145577</commentid>
    <comment_count>5</comment_count>
    <who name="Gianni Chiappetta">gianni</who>
    <bug_when>2009-09-08 15:58:59 -0700</bug_when>
    <thetext>Sorry about that, moved it to a new server. Updated URL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145578</commentid>
    <comment_count>6</comment_count>
      <attachid>39224</attachid>
    <who name="Gianni Chiappetta">gianni</who>
    <bug_when>2009-09-08 16:08:24 -0700</bug_when>
    <thetext>Created attachment 39224
Test case - Outer document</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145579</commentid>
    <comment_count>7</comment_count>
      <attachid>39225</attachid>
    <who name="Gianni Chiappetta">gianni</who>
    <bug_when>2009-09-08 16:09:20 -0700</bug_when>
    <thetext>Created attachment 39225
Test case - Inner document</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145628</commentid>
    <comment_count>8</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2009-09-08 18:58:28 -0700</bug_when>
    <thetext>This seems to be fixed in the latest nightlies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145779</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-09-09 08:50:21 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; This seems to be fixed in the latest nightlies.

This was fixed by r46068:  &lt;http://trac.webkit.org/changeset/46068&gt;

That means this bug is a duplicate of Bug 27276, but I&apos;m hesitant to dupe it since this would provide some potentially unwanted information disclosure.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>39224</attachid>
            <date>2009-09-08 16:08:24 -0700</date>
            <delta_ts>2009-09-08 16:08:24 -0700</delta_ts>
            <desc>Test case - Outer document</desc>
            <filename>url.txt</filename>
            <type>text/plain</type>
            <size>37</size>
            <attacher name="Gianni Chiappetta">gianni</attacher>
            
              <data encoding="base64">aHR0cDovL2dmMy5jYS9zYWZhcmlfc2NvcGUvaW5kZXguaHRtbA==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>39225</attachid>
            <date>2009-09-08 16:09:20 -0700</date>
            <delta_ts>2009-09-08 16:09:20 -0700</delta_ts>
            <desc>Test case - Inner document</desc>
            <filename>url.txt</filename>
            <type>text/plain</type>
            <size>37</size>
            <attacher name="Gianni Chiappetta">gianni</attacher>
            
              <data encoding="base64">aHR0cDovL2dmMy5jYS9zYWZhcmlfc2NvcGUvaW5uZXIuaHRtbA==
</data>

          </attachment>
      

    </bug>

</bugzilla>