<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -355,9 +355,24 @@ function GM_isGreasemonkeyable(url) {
                .getService(Components.interfaces.nsIIOService)
                .extractScheme(url);
 
-  return (scheme == &quot;http&quot; || scheme == &quot;https&quot; || scheme == &quot;file&quot; ||
-          scheme == &quot;ftp&quot; || url.match(/^about:cache/)) &amp;&amp;
-          !/hiddenWindow\.html$/.test(url);
+  if (&quot;http&quot; == scheme) return true;
+  if (&quot;https&quot; == scheme) return true;
+  if (&quot;ftp&quot; == scheme) return true;
+  if (&quot;data&quot; == scheme) return true;
+
+  if (&quot;file&quot; == scheme) {
+    return GM_prefRoot.getValue('fileIsGreaseable');
+  }
+
+  if (&quot;about&quot; == scheme) {
+    // Always allow &quot;about:blank&quot;.
+    if (/^about:blank/.test(url)) return true;
+
+    // Conditionally allow the rest of &quot;about:&quot;.
+    return GM_prefRoot.getValue('aboutIsGreaseable');
+  }
+
+  return false;
 }
 
 function GM_isFileScheme(url) {</diff>
      <filename>content/utils.js</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1,3 @@
 pref(&quot;extensions.{e4a8a97b-f2ed-450b-b12d-ee082ba24781}.description&quot;, &quot;chrome://greasemonkey/locale/greasemonkey.properties&quot;);
+pref(&quot;greasemonkey.aboutIsGreaseable&quot;, false);
+pref(&quot;greasemonkey.fileIsGreaseable&quot;, false);</diff>
      <filename>defaults/preferences/greasemonkey.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8cc502c92629b090e4d016af9ff7e56c13557862</id>
    </parent>
  </parents>
  <author>
    <name>Anthony Lieuallen</name>
    <email>arantius@gmail.com</email>
  </author>
  <url>http://github.com/teramako/greasemonkey-for-prism/commit/61695fe69493136dadd30b2206caf478d5096ecc</url>
  <id>61695fe69493136dadd30b2206caf478d5096ecc</id>
  <committed-date>2009-08-12T20:18:49-07:00</committed-date>
  <authored-date>2009-08-11T09:00:17-07:00</authored-date>
  <message>Alter GM_isGreasemonkeyable() for security and features.

Restrict greasing file: and about: URLs, to plug a potential security
hole.  (Add an about:config accessible preference to override this.)
Add greasing data: URLs, and always about:blank (regardless of above).

Signed-off-by: Johan Sundstr&#246;m &lt;oyasumi+github@gmail.com&gt;</message>
  <tree>300eee2b86db6d9e166c860bde0604e8027f04ba</tree>
  <committer>
    <name>Johan Sundstr&#246;m</name>
    <email>oyasumi+github@gmail.com</email>
  </committer>
</commit>
