<?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>110557</bug_id>
          
          <creation_ts>2013-02-21 22:25:43 -0800</creation_ts>
          <short_desc>DatabaseTracker::getMaxSizeForDatabase() can return an erroneously large value</short_desc>
          <delta_ts>2013-02-25 15:58: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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>110600</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Lam">mark.lam</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>beidson</cc>
    
    <cc>benjamin</cc>
    
    <cc>ggaren</cc>
    
    <cc>michaeln</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>839239</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-21 22:25:43 -0800</bug_when>
    <thetext>Currently DatabaseTracker::getMaxSizeForDatabase() estimates the max allowed size for a database based on the following formula:

     maxSize = quota - currentDiskUsage + databaseFileSize;

currentDiskUsage is read from the disk.  If some bug or external factor should be able to cause currentDiskUsage to be greater than quota + databaseFileSize, then maxSize will be negative and be interpreted as an unreasonably large size that far exceeds the quota.  We should fix this by adding some sanity checks to bound the maxSize just in case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839244</commentid>
    <comment_count>1</comment_count>
      <attachid>189687</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-21 22:32:09 -0800</bug_when>
    <thetext>Created attachment 189687
the fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839263</commentid>
    <comment_count>2</comment_count>
      <attachid>189687</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-02-21 22:59:03 -0800</bug_when>
    <thetext>Comment on attachment 189687
the fix

The comment here says that we&apos;re guarding against currentUsage &gt; quota + databaseSize. But the code says we&apos;re guarding against currentUsage &gt; quota or databaseFileSize &gt; quota or quota - currentUsage + databaseFileSize &gt; quota.

The test case you created showed currentUsage &gt; quota. The most direct way to fix that is:
if (currentUsage &gt; quota)
    currentUsage = quota;

With that check, do any of the other checks add anything?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839268</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-21 23:06:13 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 189687 [details])
&gt; The comment here says that we&apos;re guarding against currentUsage &gt; quota + databaseSize. But the code says we&apos;re guarding against currentUsage &gt; quota or databaseFileSize &gt; quota or quota - currentUsage + databaseFileSize &gt; quota.
&gt; 
&gt; The test case you created showed currentUsage &gt; quota. The most direct way to fix that is:
&gt; if (currentUsage &gt; quota)
&gt;     currentUsage = quota;
&gt; 
&gt; With that check, do any of the other checks add anything?

I&apos;m being paranoid in case databaseFileSize somehow gets larger than quota as well.  So, I cap the maxSize to quota.

If that happens I&apos;m telling the database that I want it to be smaller as opposed to artificially endorsing its greater than quota size.  Whether the sqlite database can shrink to the smaller size or not is a whole separate issue.

With that I can re-write the logic as:

   if (currentUsage &gt; quota)
       currentUsage = quota;
   maxSize = quota - currentUsage + databaseFileSize;
   if (maxSize &gt; quota)
       maxSize = quota;

If you&apos;re ok with that, I can go with that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839368</commentid>
    <comment_count>4</comment_count>
      <attachid>189687</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-02-22 01:32:11 -0800</bug_when>
    <thetext>Comment on attachment 189687
the fix

View in context: https://bugs.webkit.org/attachment.cgi?id=189687&amp;action=review

Can&apos;t you test this?

For example, wouldn&apos;t this go to the branch?:
1) Assign a large quota.
2) Create a giant database
3) Reduce the Quota
4) ...
5) Profit!

&gt; Source/WebCore/ChangeLog:10
&gt; +
&gt; +        No new tests.
&gt; +

Maybe add a word of explanation in the ChangeLog.

Why no test?

&gt; Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp:312
&gt; +    // The quota comes from a configuration value while the currentUsage comes
&gt; +    // from a measurement of the real disk usage. Let&apos;s consider a situation
&gt; +    // where there is a bug (regardless of the source) where the currentUsage gets
&gt; +    // unreasonably large such that currentUsage &gt; quota + databaseSize. In that
&gt; +    // case, maxSize, computed as (quota - currentUsage + databaseFileSize) will
&gt; +    // be negative and will be misinterpreted as a very large number, thereby
&gt; +    // effectively granting the database permission to grow unboundedly beyond the
&gt; +    // quota.
&gt; +    //
&gt; +    // Hence, we will do some explicit checks here to guard against this, and
&gt; +    // ensure some sanity.

I am really not a fan of this comment. It reads like you have a mysterious bug elsewhere, and instead of finding it, you just added this workaround here.
If you add an explanation here, it should be of the real use case, not a bug (regardless of the source).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839430</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 03:28:38 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 189687 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=189687&amp;action=review
&gt; 
&gt; Can&apos;t you test this?
&gt; 
&gt; For example, wouldn&apos;t this go to the branch?:
&gt; 1) Assign a large quota.
&gt; 2) Create a giant database
&gt; 3) Reduce the Quota
&gt; 4) ...
&gt; 5) Profit!

Thanks for your comment.

I presume you are hinting at some edge cases where the currentUsage gets so large that it becomes negative for the int64_t values I&apos;m using.  I&apos;m going to change the type of all the quantities to uint64_t.  With a signed int64_t, there is a theoretical possibility of an overflow of currentUsage and databaseFileSize.  In practice, I think that is unrealistic.  Regardless, it is a much stronger position to use unsigned values and not have to deal with the overflow conditions.

If you are trying to hint at something else other than this, please enlighten me.  Thanks.

&gt; &gt; Source/WebCore/ChangeLog:10
&gt; &gt; +
&gt; &gt; +        No new tests.
&gt; &gt; +
&gt; 
&gt; Maybe add a word of explanation in the ChangeLog.
&gt; 
&gt; Why no test?

No test because this is a trivial change, time is limited, and my time is better spent on fixing the real bug (which is not the purpose of this patch ... see below).
 
&gt; &gt; Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp:312
&gt; &gt; +    // The quota comes from a configuration value while the currentUsage comes
&gt; &gt; +    // from a measurement of the real disk usage. Let&apos;s consider a situation
&gt; &gt; +    // where there is a bug (regardless of the source) where the currentUsage gets
&gt; &gt; +    // unreasonably large such that currentUsage &gt; quota + databaseSize. In that
&gt; &gt; +    // case, maxSize, computed as (quota - currentUsage + databaseFileSize) will
&gt; &gt; +    // be negative and will be misinterpreted as a very large number, thereby
&gt; &gt; +    // effectively granting the database permission to grow unboundedly beyond the
&gt; &gt; +    // quota.
&gt; &gt; +    //
&gt; &gt; +    // Hence, we will do some explicit checks here to guard against this, and
&gt; &gt; +    // ensure some sanity.
&gt; 
&gt; I am really not a fan of this comment. It reads like you have a mysterious bug elsewhere, and instead of finding it, you just added this workaround here.
&gt; If you add an explanation here, it should be of the real use case, not a bug (regardless of the source).

I purposely did not talk about the real bug (not because I didn&apos;t know what it is, but) because it is not the intent of this patch to fix the bug.  I am working on the fix for the real bug in a separate effort.  The intent of this patch is to provide a sanity check that enforces the contract of the function DatabaseTracker::getMaxSizeOfDatabase().  My understanding of the contract is that the size of the database should not be allowed to grow to exceed the quota for its domain origin.

Hence, the checks added in my patch ensures that:
1. the estimated allowed growth (i.e. quota - currentUsage) is reasonable (i.e. quota - currentUsage &lt;= quota, i.e. current &lt;= quota).
2. the returned value of &quot;max size of database&quot; is reasonable (i.e. maxSize &lt;= quota).

For realistic values of quota, currentUsage, and databaseFileSize, I believe the logic of the patch is sound.  A realistic value of currentUsage and databaseSize in this case does not include them being so large that they overflow into negative values (though I&apos;ve not explained why here).  But I agree that it is better to make them unsigned and just avoid even the possibility of complications due to overflow.

Note: &quot;quota&quot; is expected to come from a trusted source and is a sane value (hence, my mentioning &quot;configuration value&quot;).  &quot;currentUsage&quot; and &quot;databaseFileSize&quot; is not to be trusted.  If the damage is already done by someone else to get a currentUsage and/or databaseFileSize that is larger than we should allow, it is not the role of DatabaseTracker::getMaxSizeOfDatabase() to fix that (i.e. reduce it, or prevent it) nor does it have any ability to.  The fix for such an issue lies elsewhere.  However, it is the role of DatabaseTracker::getMaxSizeOfDatabase() to compute what it considers to be a sane estimate of the max size of the database in question.  

As for the comment, I intended it to give some context and motivation for why the sanity checks are meaningful.  It is not appropriate to document the specific bug I&apos;m guarding against here just because it happens to be the instance that pointed out that we could use some defensive coding here in DatabaseTracker::getMaxSizeOfDatabase(). That said, I could probably write it better so as to not give the wrong impression that I&apos;m just trying to band-aid a bug here.  I&apos;ll look into how I can do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839538</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 06:13:09 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt; Why no test?
&gt; 
&gt; No test because this is a trivial change, time is limited, and my time is better spent on fixing the real bug (which is not the purpose of this patch ... see below).

Ok, that wasn&apos;t an appropriate answer.  Let me provide some more details as to why I&apos;m choosing to not implement a layout test that checks for the specific bug that I&apos;m working on fixing:

1. There are already existing tests that check the quota functionality in general:

    storage/websql/open-database-over-quota.html: tests quota enforcement when opening databases.
    storage/websql/quota-tracking.html: tests quota enforcement when writing records. 

    However, these only tests quota management for the single process scenario.

2. I could be wrong but I don&apos;t think we have a test harness for executing multi-process stress tests yet. 

That said, while I don&apos;t have a layout test to add, I do have a test that I do run by hand to verify the existence of the error condition (with the help of instrumented logging), and then to verify the fix.


&gt; I purposely did not talk about the real bug (not because I didn&apos;t know what it is, but) because it is not the intent of this patch to fix the bug.  I am working on the fix for the real bug in a separate effort.

FYI, the &quot;real&quot; bug that highlighted the need for the sanity check in this patch is at https://bugs.webkit.org/show_bug.cgi?id=110600.  Again, unlike bug 110600, this bug, 110557, is only intended to put in place a sanity check that enforces the contract of DatabaseTracker::getMaxSizeForDatabase().  It is a defensive maneuver to limit the damage that 110600 (and potentially other bugs like it in the future) can cause.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839683</commentid>
    <comment_count>7</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-02-22 10:00:39 -0800</bug_when>
    <thetext>&gt; I purposely did not talk about the real bug....

I have to agree with Ben: There&apos;s no way to understand this code without direct explanation of what it fixes.

The bug we&apos;re trying to fix is this: If any bug anywhere ever allows an origin to exceed its quota, even by a byte, the origin will thereafter exceed its quota by 2^64. 

&gt; I&apos;m being paranoid in case databaseFileSize somehow gets larger than quota as well.

Paranoia is fear of the unknown. Fear is the mindkiller. Let&apos;s not litter our code with fear. Instead, let&apos;s document the known things we&apos;re trying to fix.

Total disk usage for this origin may be greater than quota. Total disk usage is a superset of this individual database&apos;s usage, so checking total disk usage is sufficient. How about this:

unsigned long long quota = quotaForOriginNoLock(origin);
unsigned long long diskUsage = originQuotaManager().diskUsage(origin);
unsigned long long databaseFileSize = SQLiteFileSystem::getDatabaseFileSize(database-&gt;fileName());

// A previous error may have allowed the database to exceed its quota. Don&apos;t multiply that error through
// integer underflow, or the quota will permanently become 2^64.
if (diskUsage &gt; quota)
    return 0;
ASSERT(databaseFileSize &lt; diskUsage);

return quota - diskUsage + databaseFileSize;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839790</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 11:54:55 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; if (diskUsage &gt; quota)
&gt;     return 0;
&gt; ASSERT(databaseFileSize &lt; diskUsage);
&gt; 
&gt; return quota - diskUsage + databaseFileSize;

That won&apos;t work.  Here&apos;s why: diskUsage comes from OriginUsageManager::diskUsage() which uses a cached value from a stat of the filesystem.  The cached value will remain in use as long as the current process hasn&apos;t executed a database action that invalidates it.  On the other hand, databaseFileSize comes from SQLiteFileSystem::getDatabaseFileSize() which is a stat of the database file every time.

So, imagine a scenario where process P1 and P2 both opens a database with the same name.  P1 cached the diskUsage at one time and didn&apos;t execute any action that invalidates it till now.  Meanwhile P2 has been busy adding more data to the database file thereby increasing its size.

And then in P1, we get to this code in  getMaxSizeForDatabase().  P1 uses its cached diskUsage (which at one time is greater then databaseFileSize) and fetches the current databaseFileSize (which P2 has been pumping up).  The result the databaseFileSize can be greater than diskUsage.

So, how about we do this instead:

unsigned long long quota = quotaForOriginNoLock(origin);
unsigned long long diskUsage = originQuotaManager().diskUsage(origin);
unsigned long long databaseFileSize = SQLiteFileSystem::getDatabaseFileSize(database-&gt;fileName());

// A previous error may have allowed the database to exceed its quota. Don&apos;t multiply that error through
// integer underflow, or the quota will permanently become 2^64.
if (diskUsage &gt; quota)
    return 0;
unsigned long long maxSize = quota - diskUsage + databaseFileSize;
if (maxSize &gt; quota)
    return 0;
return maxSize;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839819</commentid>
    <comment_count>9</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-02-22 12:35:59 -0800</bug_when>
    <thetext>&gt; That won&apos;t work.  Here&apos;s why:

Great! Now we&apos;re making progress with specifics.

&gt; So, how about we do this instead:
&gt; 
&gt; unsigned long long quota = quotaForOriginNoLock(origin);
&gt; unsigned long long diskUsage = originQuotaManager().diskUsage(origin);
&gt; unsigned long long databaseFileSize = SQLiteFileSystem::getDatabaseFileSize(database-&gt;fileName());
&gt; 
&gt; // A previous error may have allowed the database to exceed its quota. Don&apos;t multiply that error through
&gt; // integer underflow, or the quota will permanently become 2^64.
&gt; if (diskUsage &gt; quota)
&gt;     return 0;
&gt; unsigned long long maxSize = quota - diskUsage + databaseFileSize;
&gt; if (maxSize &gt; quota)
&gt;     return 0;
&gt; return maxSize;

I think this would be slightly clearer like so:

// A previous error may have allowed the origin to exceed its quota, or may have allowed this database
// to exceed our cached estimate of the origin. Don&apos;t multiply that error through integer underflow, or
// the quota will permanently become 2^64.
unsigned long long maxSize = quota - diskUsage + databaseFileSize;
if (maxSize &gt; quota)
    return 0;
return maxSize;

I updated the comment to mention the two specific errors we&apos;re concerned about, and I changed the code not to test for disUsage specifically, since the only real protection we&apos;re providing here is against underflow of maxSize.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839921</commentid>
    <comment_count>10</comment_count>
      <attachid>189821</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 14:02:29 -0800</bug_when>
    <thetext>Created attachment 189821
Test for opening a randomly named database and consuming storage space.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839923</commentid>
    <comment_count>11</comment_count>
      <attachid>189822</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 14:03:15 -0800</bug_when>
    <thetext>Created attachment 189822
updated fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839931</commentid>
    <comment_count>12</comment_count>
      <attachid>189822</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-02-22 14:06:27 -0800</bug_when>
    <thetext>Comment on attachment 189822
updated fix.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839941</commentid>
    <comment_count>13</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 14:10:55 -0800</bug_when>
    <thetext>Thanks for the review.  Landed in r143791: &lt;http://trac.webkit.org/changeset/143791&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839953</commentid>
    <comment_count>14</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-22 14:14:34 -0800</bug_when>
    <thetext>&lt;rdar://problem/13260686&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>841079</commentid>
    <comment_count>15</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-25 10:15:46 -0800</bug_when>
    <thetext>The value returned by DatabaseTracker::getMaxSizeForDatabase() is used to set the SQLite3 database size using a sql command &quot;PRAGMA max_page_count = &lt;size&gt;”.  The SQLite3 documentation on this pragma says, &quot;The maximum page count cannot be reduced below the current database size.&quot;

It is undefined what will happen if we set the sqlite max_page_count to 0.  However, further testing shows that having getMaxSizeForDatabase() return a 0 (when a quota breach is detected), proves to be ineffective at stopping runaway database growth.  In contrast, having getMaxSizeForDatabase() return the size of the existing database seems to do the job.

In the interest of time, I’m proposing to not dive into the SQLite3 code at this time to figure out the specifics.  I believe it is reasonable to have getMaxSizeForDatabase() return the current size when the quota limit has been reached, and testing shows that it works so far.  Unless we have more data that say we should do otherwise, I propose going with this solution for the present, and perhaps dig further into the SQLite3 library for details at a later time.

Note: here are some testing data points that guided me to this conclusion:

When the quota limit has been reached, I tried having getMaxSizeForDatabase() return various values:

Value returned  Reason for value           Result
=========  ==========           ====
0                       current approach          Fails to stop growth.
1024                 &lt; sqlite page size         Fails to stop growth.
2048                 &lt; sqlite page size         Fails to stop growth.
2048                 &lt; sqlite page size         Fails to stop growth.
3072                 &lt; sqlite page size         Fails to stop growth.
4096                 1 page                          Growth stops.
actual DB size    return current size       Growth stops.

SQLiteDatabase::setMaximumSize() calculates the max page count (for the pragma) by dividing the new max database size by the page size.  Hence, anything less than 4096 will effectively set a max page count of 0, and that has proven consistently to fail to stop the growth.  While returning the page size 4096 seems to work, that seems like a somewhat arbitrary value to have getMaxSizeForDatabase() return.  The most meaningful return value would be the current database size.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>841081</commentid>
    <comment_count>16</comment_count>
      <attachid>190085</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-25 10:17:12 -0800</bug_when>
    <thetext>Created attachment 190085
Patch for returning current database size instead of 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>841082</commentid>
    <comment_count>17</comment_count>
      <attachid>190085</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-25 10:19:18 -0800</bug_when>
    <thetext>Comment on attachment 190085
Patch for returning current database size instead of 0.

View in context: https://bugs.webkit.org/attachment.cgi?id=190085&amp;action=review

&gt; Source/WebCore/ChangeLog:4
&gt; +        to return the previous database size instead of 0.

That doesn’t read well.  I’ll change this to “Changed DatabaseTracker::getMaxSizeForDatabase() to return the previous database size instead of 0 when the quota limit has been reached.”</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>841102</commentid>
    <comment_count>18</comment_count>
      <attachid>190085</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-02-25 10:42:36 -0800</bug_when>
    <thetext>Comment on attachment 190085
Patch for returning current database size instead of 0.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>841150</commentid>
    <comment_count>19</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-02-25 11:38:56 -0800</bug_when>
    <thetext>Thanks for the review.  Landed in r143954: &lt;http://trac.webkit.org/changeset/143954&gt;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>189687</attachid>
            <date>2013-02-21 22:32:09 -0800</date>
            <delta_ts>2013-02-22 14:03:15 -0800</delta_ts>
            <desc>the fix</desc>
            <filename>bug-110557.patch</filename>
            <type>text/plain</type>
            <size>2767</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZ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R5
LgorCisgICAgaW50NjRfdCBtYXhTaXplOworICAgIGlmIChjdXJyZW50VXNhZ2UgPiBxdW90YSkK
KyAgICAgICAgbWF4U2l6ZSA9IGRhdGFiYXNlRmlsZVNpemU7CisgICAgZWxzZQorICAgICAgICBt
YXhTaXplID0gcXVvdGEgLSBjdXJyZW50VXNhZ2UgKyBkYXRhYmFzZUZpbGVTaXplOworCisgICAg
aWYgKG1heFNpemUgPiBxdW90YSkKKyAgICAgICAgbWF4U2l6ZSA9IHF1b3RhOworCisgICAgcmV0
dXJuIG1heFNpemU7CiB9CiAKIHZvaWQgRGF0YWJhc2VUcmFja2VyOjpkYXRhYmFzZUNoYW5nZWQo
RGF0YWJhc2VCYWNrZW5kQmFzZSogZGF0YWJhc2UpCg==
</data>
<flag name="review"
          id="210183"
          type_id="1"
          status="-"
          setter="benjamin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>189821</attachid>
            <date>2013-02-22 14:02:29 -0800</date>
            <delta_ts>2013-02-22 14:02:29 -0800</delta_ts>
            <desc>Test for opening a randomly named database and consuming storage space.</desc>
            <filename>quota-test.html</filename>
            <type>text/html</type>
            <size>10281</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">PGJvZHk+CjxzY3JpcHQ+Ci8vIFRoaXMgdGVzdCBjcmVhdGVzIGEgZGF0YWJhc2Ugd2l0aCBhIHJh
bmRvbSBuYW1lIChzZWUgJ2RiTmFtZScpIGFuZCBhdHRlbXB0cyB0bwovLyBob2cgYXMgbXVjaCBz
dG9yYWdlIHNwYWNlIGFzIHBvc3NpYmxlLiBUbyB0ZXN0IGl0IGluIGEgbXVsdGktcHRvY2VzcyBl
bnZpcm9ubWVudCwKLy8gbG9hZCB0aGUgcGFnZSBpbiBtdWx0aXBsZSBwcm9jZXNzZXMsIGFuZCBt
b25pdG9yIHRoZSBzaXplIG9mIHRoZSBkYXRhYmFzZQovLyBkaXJlY3RvcnkgYW5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xsYmFjayA9IGZ1bmN0aW9uKHRyYW5zYWN0aW9uLCBlcnJvcikgewogICAgICAgIC8vYWxlcnQo
Ik9oIG5vZXMhIFRoZXJlIGhheiBiaW4gYSBkYXRhYmFzZSBlcnJvciBpbiBJTklUIHN0YXRlbWVu
dCEgOiBlcnIgPSAiICsgZXJyb3IuY29kZSArICIgJyIgKyBlcnJvci5tZXNzYWdlICsgIiciKTsK
ICAgICAgICBpc0Fib3J0ZWQgPSB0cnVlOwogICAgfQoKICAgIC8vIENyZWF0ZSB0aGUgdGFibGU6
CiAgICBkYi50cmFuc2FjdGlvbigKICAgICAgICBmdW5jdGlvbih0cmFuc2FjdGlvbikgewogICAg
ICAgICAgICB0cmFuc2FjdGlvbi5leGVjdXRlU3FsKCJDUkVBVEUgVEFCTEUgSUYgTk9UIEVYSVNU
UyBzdHVmZiAoIiArCiAgICAgICAgICAgICAgICAiaWQgSU5URUdFUiBOT1QgTlVMTCBQUklNQVJZ
IEtFWSBBVVRPSU5DUkVNRU5ULCIgKwogICAgICAgICAgICAgICAgIm5hbWUgVEVYVCBOT1QgTlVM
TCwiICsKICAgICAgICAgICAgICAgICJ4IElOVEVHRVIgTk9UIE5VTEwsIiArCiAgICAgICAgICAg
ICAgICAieSBJTlRFR0VSIE5PVCBOVUxMLCIgKwogICAgICAgICAgICAgICAgInogSU5URUdFUiBO
T1QgTlVMTCwiICsKICAgICAgICAgICAgICAgICJjaGVja3N1bSBJTlRFR0VSIE5PVCBOVUxMKTsi
LAogICAgICAgICAgICAgICAgW10sCiAgICAgICAgICAgICAgICBpbml0U3RhdGVtZW50U3VjY2Vz
c0NhbGxiYWNrLAogICAgICAgICAgICAgICAgaW5pdFN0YXRlbWVudEVycm9yQ2FsbGJhY2spOwog
ICAgICAgIH0sCiAgICAgICAgaW5pdFRyYW5zYWN0aW9uRXJyb3JDYWxsYmFjaywKICAgICAgICBp
bml0VHJhbnNhY3Rpb25TdWNjZXNzQ2FsbGJhY2sKICAgICk7Cn07Cgov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ISA6IGVy
ciA9ICIgKyBlcnJvci5jb2RlICsgIiAnIiArIGVycm9yLm1lc3NhZ2UgKyAiJyIpOwogICAgICAg
IGNsZWFySW50ZXJ2YWwoaW5zZXJ0SW50ZXJ2YWwpOwogICAgICAgIGNsZWFySW50ZXJ2YWwobG9h
ZEludGVydmFsKTsKICAgICAgICBpc0Fib3J0ZWQgPSB0cnVlOwogICAgICAgIHJldHVybiBmYWxz
ZTsKICAgIH0KCiAgICBkYi50cmFuc2FjdGlvbigKICAgICAgICBmdW5jdGlvbih0cmFuc2FjdGlv
bikgewogICAgICAgICAgICB2YXIgajsKICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IDEwMDAg
JiYgIWlzQWJvcnRlZDsgaisrKSB7CiAgICAgICAgICAgIHRyYW5zYWN0aW9uLmV4ZWN1dGVTcWwo
KCJJTlNFUlQgSU5UTyBzdHVmZiAobmFtZSwgeCwgeSwgeiwgY2hlY2tzdW0pIFZBTFVFUyAoPywg
PywgPywgPywgPyk7IiksCiAgICAgICAgICAgICAgICBbbmFtZSwgeCwgeSwgeiwgY2hlY2tzdW1d
LAogICAgICAgICAgICAgICAgaW5zZXJ0U3RhdGVtZW50U3VjY2Vzc0NhbGxiYWNrLAogICAgICAg
ICAgICAgICAgaW5zZXJ0U3RhdGVtZW50RXJyb3JDYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAg
ICAgICB9LAogICAgICAgIGluc2VydFRyYW5zYWN0aW9uRXJyb3JDYWxsYmFjaywKICAgICAgICBp
bnNlcnRUcmFuc2FjdGlvblN1Y2Nlc3NDYWxsYmFjawogICAgKTsKfQoKLy89PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09Ci8vIFVQREFURQoKdmFyIHVwZGF0ZUNvdW50ID0gMDsKdmFyIHVwZGF0ZUVycm9yQ291
bnQgPSAwOwp2YXIgdXBkYXRlU3VjY2Vzc0NvdW50ID0gM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ICAgICAgIGluc2VydFN0dWZmKG5hbWUsIHgsIHksIHosIGNo
ZWNrc3VtKTsKICAgIH0KCiAgICB2YXIgbmFtZTsKICAgIHZhciB4OwogICAgdmFyIHk7CiAgICB2
YXIgejsKICAgIHZhciBjaGVja3N1bTsKICAgIHZhciBpOwogICAgdmFyIHJlc3VsdFN0cjsKICAg
IHZhciByb3c7CgoKICAgIHN0YXJ0TWF5aGVtID0gZnVuY3Rpb24oKSB7CiAgICAgICAgZnVuY3Rp
b24gdmVyaWZ5SW5zZXJ0KHJlc3VsdHMpIHsKICAgICAgICAgICAgLy92YXIgcmVzdWx0c1N0ciA9
ICJJTlNFUlQgcmVzdWx0cy5yb3dzLmxlbmd0aCA9ICIgKyByZXN1bHRzLnJvd3MubGVuZ3RoICsg
IlxuIjsKICAgICAgICAgICAgLy9hbGVydChyZXN1bHRzU3RyKTsKICAgICAgICB9CiAgICAgICAg
aW5zZXJ0SW50ZXJ2YWwgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpIHsKICAgICAgICAgICAgZm9y
IChpID0gMTsgaSA8PSAxMDAwICYmICFpc0Fib3J0ZWQ7IGkrKykgewogICAgICAgICAgICAgICAg
bmFtZSA9ICJlbnRyeSIgKyByYW5kKDEwKTsKICAgICAgICAgICAgICAgIHggPSByYW5kKHJhbmRM
aW1pdCk7CiAgICAgICAgICAgICAgICB5ID0gcmFuZChyYW5kTGltaXQpOwogICAgICAgICAgICAg
ICAgeiA9IHJhbmQocmFuZExpbWl0KTsKICAgICAgICAgICAgICAgIGNoZWNrc3VtID0geCArIHkg
KyB6OwogICAgICAgICAgICAgICAgaW5zZXJ0U3R1ZmYobmFtZSwgeCwgeSwgeiwgY2hlY2tzdW0s
IHZlcmlmeUluc2VydCk7CiAgICAgICAgICAgICB9CgogICAgICAgIH0sIDMzKTsKCiAgICAgICAg
dmFyIGxvYWRDb3VudCA9IDA7CiAgICAgICAgZnVuY3Rpb24gdmVyaWZ5TG9hZChyZXN1bHRzKSB7
CiAgICAgICAgICAgIGxvYWRDb3VudCsrOwogICAgICAgICAgICBpZiAobG9hZENvdW50ID4gMTAw
KSBsb2FkQ291bnQgPSAwOwoKICAgICAgICAgICAgdmFyIHN0YXJ0SW5kZXggPSAwOwogICAgICAg
ICAgICBpZiAocmVzdWx0cy5yb3dzLmxlbmd0aCA+IDUpIHsKICAgICAgICAgICAgICAgIHJlc3Vs
dFN0ciArPSAiLi4uXG4iOwogICAgICAgICAgICAgICAgc3RhcnRJbmRleCA9IHJlc3VsdHMucm93
cy5sZW5ndGggLSA1OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAoaSA9IHN0YXJ0SW5k
ZXg7IGkgPCByZXN1bHRzLnJvd3MubGVuZ3RoICYmICFpc0Fib3J0ZWQ7IGkrKykgewogICAgICAg
ICAgICAgICAgcm93ID0gcmVzdWx0cy5yb3dzLml0ZW0oaSk7CiAgICAgICAgICAgICAgICBjaGVj
a3N1bSA9IHJvdy54ICsgcm93LnkgKyByb3cuejsKICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9
IChjaGVja3N1bSA9PT0gcm93LmNoZWNrc3VtKTsKCiAgICAgICAgICAgICAgICBpZiAobG9hZENv
dW50ID09IDApIHsKICAgICAgICAgICAgICAgICAgICByZXN1bHRTdHIgKz0gcm93Lm5hbWUgKyAi
OiAiICsgcm93LnggKyAiICsgIiArIHJvdy55ICsgIiArICIgKyByb3cueiArICIgPT0gIiArIHJv
dy5jaGVja3N1bTsKICAgICAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKQogICAgICAgICAgICAg
ICAgICAgICAgICByZXN1bHRTdHIgKz0gIiB8IEZBSUxFRCA9ICIgKyBjaGVja3N1bTsKICAgICAg
ICAgICAgICAgICAgICByZXN1bHRTdHIgKz0gIlxuIjsKICAgICAgICAgICAgICAgICAgICBpZiAo
IW1hdGNoKQogICAgICAgICAgICAgICAgICAgICAgICBhbGVydChyZXN1bHRTdHIpOwogICAgICAg
ICAgICAgICAgICAgIGlmIChyb3cubmFtZSA9PSAoImVudHJ5IiArIG51bUVudHJpZXMpKSB7CiAg
ICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuaW5uZXJUZXh0ID0gcmVzdWx0U3Ry
OwogICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRTdHIgPSAiTE9BRCByZXN1bHRzOlxuIjsK
ICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAg
ICAgICAgICAgIGlmICghbWF0Y2gpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0U3Ry
ICs9IHJvdy5uYW1lICsgIjogIiArIHJvdy54ICsgIiArICIgKyByb3cueSArICIgKyAiICsgcm93
LnogKyAiID09ICIgKyByb3cuY2hlY2tzdW07CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3Vs
dFN0ciArPSAiIHwgRkFJTEVEID0gIiArIGNoZWNrc3VtOwogICAgICAgICAgICAgICAgICAgICAg
ICByZXN1bHRTdHIgKz0gIlxuIjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAg
ICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gcmFuZG9tbHlXYXN0ZVRpbWUoKTsKICAg
ICAgICB9CgogICAgICAgIHJlc3VsdFN0ciA9ICJMT0FEIHJlc3VsdHM6XG4iOwogICAgICAgIGxv
YWRJbnRlcnZhbCA9IHNldEludGVydmFsKGZ1bmN0aW9uKCkgewogICAgICAgICAgICBmb3IgKGkg
PSAxOyBpIDw9IG51bUVudHJpZXMgJiYgIWlzQWJvcnRlZDsgaSsrKSB7CiAgICAgICAgICAgICAg
ICBuYW1lID0gImVudHJ5IiArIGk7CiAgICAgICAgICAgICAgICBsb2FkU3R1ZmYobmFtZSwgdmVy
aWZ5TG9hZCk7CiAgICAgICAgICAgICB9CiAgICAgICAgfSwgMTAwMCk7CiAgICB9CgogICAgaWYg
KCFpc0Fib3J0ZWQpCiAgICAgICAgc2V0VGltZW91dCgic3RhcnRNYXloZW0oKSIsIDUwMDApOwp9
OwoKPC9zY3JpcHQ+CjwvYm9keT4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>189822</attachid>
            <date>2013-02-22 14:03:15 -0800</date>
            <delta_ts>2013-02-22 14:06:27 -0800</delta_ts>
            <desc>updated fix.</desc>
            <filename>bug-110557.patch</filename>
            <type>text/plain</type>
            <size>2585</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0Mzc4OCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIxIEBACisyMDEzLTAyLTIxICBNYXJrIExh
bSAgPG1hcmsubGFtQGFwcGxlLmNvbT4KKworICAgICAgICBBZGQgc29tZSBjaGVja3MgdG8gRGF0
YWJhc2VUcmFja2VyOjpnZXRNYXhTaXplRm9yRGF0YWJhc2UoKSB0byBlbnN1cmUKKyAgICAgICAg
dGhhdCBpdCByZXR1cm5zIGEgc2FuZSB2YWx1ZS4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTExMDU1Ny4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBObyBsYXlvdXQgdGVzdCwgYnV0IHRoZXJlIGlzIGEgcXVv
dGEtdGVzdC5odG1sIGF0dGFjaGVkIHRvIGJ1Z3ppbGxhLgorICAgICAgICBUaGUgdGVzdCBpcyBh
IHdlYnBhZ2UgdGhhdCBjYW4gYmUgbG9hZG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lIHRvIGV4Y2VlZCBvdXIgY2FjaGVkIGVzdGltYXRlIG9m
IHRoZSBvcmlnaW4KKyAgICAvLyBkaXNrIHVzYWdlLiBEb24ndCBtdWx0aXBseSB0aGF0IGVycm9y
IHRocm91Z2ggaW50ZWdlciB1bmRlcmZsb3csIG9yIHRoZQorICAgIC8vIGVmZmVjdGl2ZSBxdW90
YSB3aWxsIHBlcm1hbmVudGx5IGJlY29tZSAyXjY0LgorICAgIHVuc2lnbmVkIGxvbmcgbG9uZyBt
YXhTaXplID0gcXVvdGEgLSBkaXNrVXNhZ2UgKyBkYXRhYmFzZUZpbGVTaXplOworICAgIGlmICht
YXhTaXplID4gcXVvdGEpCisgICAgICAgIG1heFNpemUgPSAwOworICAgIHJldHVybiBtYXhTaXpl
OwogfQogCiB2b2lkIERhdGFiYXNlVHJhY2tlcjo6ZGF0YWJhc2VDaGFuZ2VkKERhdGFiYXNlQmFj
a2VuZEJhc2UqIGRhdGFiYXNlKQo=
</data>
<flag name="review"
          id="210366"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>190085</attachid>
            <date>2013-02-25 10:17:12 -0800</date>
            <delta_ts>2013-02-25 10:42:36 -0800</delta_ts>
            <desc>Patch for returning current database size instead of 0.</desc>
            <filename>bug-110557b.patch</filename>
            <type>text/plain</type>
            <size>2231</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0MzkzNykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDMwIEBACisyMD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
YWJhc2VUcmFja2VyLmNwcAkocmV2aXNpb24gMTQzODM1KQorKysgU291cmNlL1dlYkNvcmUvTW9k
dWxlcy93ZWJkYXRhYmFzZS9EYXRhYmFzZVRyYWNrZXIuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC0z
MDEsNyArMzAxLDcgQEAgdW5zaWduZWQgbG9uZyBsb25nIERhdGFiYXNlVHJhY2tlcjo6Z2V0TQog
ICAgIC8vIGVmZmVjdGl2ZSBxdW90YSB3aWxsIHBlcm1hbmVudGx5IGJlY29tZSAyXjY0LgogICAg
IHVuc2lnbmVkIGxvbmcgbG9uZyBtYXhTaXplID0gcXVvdGEgLSBkaXNrVXNhZ2UgKyBkYXRhYmFz
ZUZpbGVTaXplOwogICAgIGlmIChtYXhTaXplID4gcXVvdGEpCi0gICAgICAgIG1heFNpemUgPSAw
OworICAgICAgICBtYXhTaXplID0gZGF0YWJhc2VGaWxlU2l6ZTsKICAgICByZXR1cm4gbWF4U2l6
ZTsKIH0KIAo=
</data>
<flag name="review"
          id="210690"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>