<?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>34294</bug_id>
          
          <creation_ts>2010-01-28 17:17:59 -0800</creation_ts>
          <short_desc>Initialize DOM Storage&apos;s quota&apos;s current length parameter when we clone it.</short_desc>
          <delta_ts>2010-02-01 11:36:24 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeremy Orlow">jorlow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>185658</commentid>
    <comment_count>0</comment_count>
    <who name="Jeremy Orlow">jorlow</who>
    <bug_when>2010-01-28 17:17:59 -0800</bug_when>
    <thetext>Initialize DOM Storage&apos;s quota&apos;s current length parameter when we clone it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185659</commentid>
    <comment_count>1</comment_count>
      <attachid>47661</attachid>
    <who name="Jeremy Orlow">jorlow</who>
    <bug_when>2010-01-28 17:20:11 -0800</bug_when>
    <thetext>Created attachment 47661
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185661</commentid>
    <comment_count>2</comment_count>
      <attachid>47661</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-28 17:23:10 -0800</bug_when>
    <thetext>Comment on attachment 47661
Patch

Ok....  I wish this had a test, but you said in IRC that you couldn&apos;t write one that actually worked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185662</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-28 17:25:40 -0800</bug_when>
    <thetext>Jeremy said this might be a security issue.  Marking security sensitive to be safe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185668</commentid>
    <comment_count>4</comment_count>
    <who name="Jeremy Orlow">jorlow</who>
    <bug_when>2010-01-28 17:40:37 -0800</bug_when>
    <thetext>I&apos;ve looked closer and now I&apos;m pretty sure this is not a security issue.

Background:
LocalStorage has quotas and is shared by all tabs.  SessionStorage does not have quotas and is a per-tab storage.  When you create a new window, we clone the session storage.  We store the amount of quota space currently used in m_currentLength and update it on any mutations.

The current length is supposed to be copied when we clone the StorageMap but it was not.  Cloning should only ever happen for SessionStorage which has no quota (because it never touches disk and there are much better ways to fill up your memory in the browser).  In addition, it&apos;s a little far-fetched to think that a site could keep opening up more windows despite popup blockers, users noticing, etc.

Thus I think this isn&apos;t actually a security issue.  Sorry for jumping the gun!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185672</commentid>
    <comment_count>5</comment_count>
    <who name="Jeremy Orlow">jorlow</who>
    <bug_when>2010-01-28 17:59:28 -0800</bug_when>
    <thetext>Landed in 54035.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>186500</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2010-02-01 11:35:33 -0800</bug_when>
    <thetext>Removing the security bit per Comment #4.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47661</attachid>
            <date>2010-01-28 17:20:11 -0800</date>
            <delta_ts>2010-01-28 17:23:09 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-34294-20100128172009.patch</filename>
            <type>text/plain</type>
            <size>1014</size>
            <attacher name="Jeremy Orlow">jorlow</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1NDAzMCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTMgQEAKKzIwMTAtMDEtMjggIEplcmVteSBPcmxvdyAgPGpvcmxvd0BjaHJvbWl1
bS5vcmc+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAg
SW5pdGlhbGl6ZSBET00gU3RvcmFnZSdzIHF1b3RhJ3MgY3VycmVudCBsZW5ndGggcGFyYW1ldGVy
IHdoZW4gd2UgY2xvbmUgaXQuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD0zNDI5NAorCisgICAgICAgICogc3RvcmFnZS9TdG9yYWdlTWFwLmNwcDoKKyAg
ICAgICAgKFdlYkNvcmU6OlN0b3JhZ2VNYXA6OmNvcHkpOgorCiAyMDEwLTAxLTI4ICBOYXlhbiBL
dW1hciBLICA8bmF5YW5ra0BnbWFpbC5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgTGFzemxv
IEdvbWJvcy4KSW5kZXg6IFdlYkNvcmUvc3RvcmFnZS9TdG9yYWdlTWFwLmNwcAo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
Ci0tLSBXZWJDb3JlL3N0b3JhZ2UvU3RvcmFnZU1hcC5jcHAJKHJldmlzaW9uIDU0MDI0KQorKysg
V2ViQ29yZS9zdG9yYWdlL1N0b3JhZ2VNYXAuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC00Nyw2ICs0
Nyw3IEBAIFBhc3NSZWZQdHI8U3RvcmFnZU1hcD4gU3RvcmFnZU1hcDo6Y29weSgKIHsKICAgICBS
ZWZQdHI8U3RvcmFnZU1hcD4gbmV3TWFwID0gY3JlYXRlKG1fcXVvdGFTaXplKTsKICAgICBuZXdN
YXAtPm1fbWFwID0gbV9tYXA7CisgICAgbmV3TWFwLT5tX2N1cnJlbnRMZW5ndGggPSBtX2N1cnJl
bnRMZW5ndGg7CiAgICAgcmV0dXJuIG5ld01hcC5yZWxlYXNlKCk7CiB9CiAK
</data>
<flag name="review"
          id="30167"
          type_id="1"
          status="+"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>