[tor-commits] [tor-messenger-build/master] Revert tb patch for trac 14716

arlo at torproject.org arlo at torproject.org
Mon Oct 10 19:41:22 UTC 2016


commit 499f9e8798ec2c5a75826b6a64e6e727f1d41b19
Author: Arlo Breault <arlolra at gmail.com>
Date:   Sat Oct 8 19:29:49 2016 -0700

    Revert tb patch for trac 14716
---
 ...16-HTTP-Basic-Authentication-prompt-on.mozpatch | 204 +++++++++++++++++++++
 projects/instantbird/config                        |   1 +
 2 files changed, 205 insertions(+)

diff --git a/projects/instantbird/0001-Revert-Bug-14716-HTTP-Basic-Authentication-prompt-on.mozpatch b/projects/instantbird/0001-Revert-Bug-14716-HTTP-Basic-Authentication-prompt-on.mozpatch
new file mode 100644
index 0000000..bf2d69b
--- /dev/null
+++ b/projects/instantbird/0001-Revert-Bug-14716-HTTP-Basic-Authentication-prompt-on.mozpatch
@@ -0,0 +1,204 @@
+From 418c4d1825a209d67f16a30c8b2ec284a613a703 Mon Sep 17 00:00:00 2001
+From: Arlo Breault <arlolra at gmail.com>
+Date: Sat, 8 Oct 2016 18:11:20 -0700
+Subject: [PATCH] Revert "Bug 14716: HTTP Basic Authentication prompt only
+ displayed once"
+
+This reverts commit 5995aea1797320295fff1247bf4baac9ec511876.
+---
+ toolkit/components/passwordmgr/nsLoginManager.js | 81 ++----------------------
+ 1 file changed, 6 insertions(+), 75 deletions(-)
+
+diff --git a/toolkit/components/passwordmgr/nsLoginManager.js b/toolkit/components/passwordmgr/nsLoginManager.js
+index b56e849..f3c8223 100644
+--- a/toolkit/components/passwordmgr/nsLoginManager.js
++++ b/toolkit/components/passwordmgr/nsLoginManager.js
+@@ -122,25 +122,9 @@ LoginManager.prototype = {
+       log("No alternate nsILoginManagerStorage registered");
+     }
+ 
+-    // If the security.nocertdb pref. is true, we skip initialization of
+-    // login manager storage since we know it will fail.  In this case we
+-    // pretend that initialization succeeded in order to avoid a cascade of
+-    // initialization errors.
+-    if (Services.prefs.getBoolPref("security.nocertdb")) {
+-      this._storage = null;
+-      this.initializationPromise = Promise.resolve();
+-    } else {
+-      this._storage = Cc[contractID].
+-                      createInstance(Ci.nsILoginManagerStorage);
+-      try {
+-        this.initializationPromise = this._storage.initialize();
+-      } catch (e) {
+-        // If storage is not available, set _storage to null so that we can
+-        // cleanly check for a lack of storage elsewhere in this file.
+-        this._storage = null;
+-        this.initializationPromise = Promise.reject(e);
+-      }
+-    }
++    this._storage = Cc[contractID].
++                    createInstance(Ci.nsILoginManagerStorage);
++    this.initializationPromise = this._storage.initialize();
+   },
+ 
+ 
+@@ -179,8 +163,7 @@ LoginManager.prototype = {
+         this._pwmgr = null;
+       } else if (topic == "passwordmgr-storage-replace") {
+         Task.spawn(function () {
+-          if (this._pwmgr._storage)
+-            yield this._pwmgr._storage.terminate();
++          yield this._pwmgr._storage.terminate();
+           this._pwmgr._initStorage();
+           yield this._pwmgr.initializationPromise;
+           Services.obs.notifyObservers(null,
+@@ -318,9 +301,6 @@ LoginManager.prototype = {
+     if (logins.some(l => login.matches(l, true)))
+       throw new Error("This login already exists.");
+ 
+-    if (!this._storage)
+-      throw new Error("No storage to add login");
+-
+     log("Adding login");
+     return this._storage.addLogin(login);
+   },
+@@ -332,12 +312,6 @@ LoginManager.prototype = {
+    */
+   removeLogin : function (login) {
+     log("Removing login");
+-
+-    if (!this._storage) {
+-      log("No storage to remove login");
+-      return null;
+-    }
+-
+     return this._storage.removeLogin(login);
+   },
+ 
+@@ -349,12 +323,6 @@ LoginManager.prototype = {
+    */
+   modifyLogin : function (oldLogin, newLogin) {
+     log("Modifying login");
+-
+-    if (!this._storage) {
+-      log("No storage to modify login");
+-      return null;
+-    }
+-
+     return this._storage.modifyLogin(oldLogin, newLogin);
+   },
+ 
+@@ -370,12 +338,6 @@ LoginManager.prototype = {
+    */
+   getAllLogins : function (count) {
+     log("Getting a list of all logins");
+-
+-    if (!this._storage) {
+-      log("No storage to get all logins");
+-      return null;
+-    }
+-
+     return this._storage.getAllLogins(count);
+   },
+ 
+@@ -387,10 +349,7 @@ LoginManager.prototype = {
+    */
+   removeAllLogins : function () {
+     log("Removing all logins");
+-    if (!this._storage)
+-      log("No storage to remove all logins");
+-    else
+-      this._storage.removeAllLogins();
++    this._storage.removeAllLogins();
+   },
+ 
+   /*
+@@ -405,12 +364,6 @@ LoginManager.prototype = {
+    */
+   getAllDisabledHosts : function (count) {
+     log("Getting a list of all disabled hosts");
+-
+-    if (!this._storage) {
+-      log("No storage to get all disabled hosts");
+-      return null;
+-    }
+-
+     return this._storage.getAllDisabledHosts(count);
+   },
+ 
+@@ -424,11 +377,6 @@ LoginManager.prototype = {
+     log("Searching for logins matching host:", hostname,
+         "formSubmitURL:", formSubmitURL, "httpRealm:", httpRealm);
+ 
+-    if (!this._storage) {
+-      log("No storage to find logins");
+-      return null;
+-    }
+-
+     return this._storage.findLogins(count, hostname, formSubmitURL,
+                                     httpRealm);
+   },
+@@ -445,11 +393,6 @@ LoginManager.prototype = {
+   searchLogins : function(count, matchData) {
+    log("Searching for logins");
+ 
+-    if (!this._storage) {
+-      log("No storage to search logins");
+-      return null;
+-    }
+-
+     return this._storage.searchLogins(count, matchData);
+   },
+ 
+@@ -464,9 +407,6 @@ LoginManager.prototype = {
+     log("Counting logins matching host:", hostname,
+         "formSubmitURL:", formSubmitURL, "httpRealm:", httpRealm);
+ 
+-    if (!this._storage)
+-      return 0;
+-
+     return this._storage.countLogins(hostname, formSubmitURL, httpRealm);
+   },
+ 
+@@ -475,9 +415,6 @@ LoginManager.prototype = {
+    * uiBusy
+    */
+   get uiBusy() {
+-    if (!this._storage)
+-      return false;
+-
+     return this._storage.uiBusy;
+   },
+ 
+@@ -486,9 +423,6 @@ LoginManager.prototype = {
+    * isLoggedIn
+    */
+   get isLoggedIn() {
+-    if (!this._storage)
+-      return false;
+-
+     return this._storage.isLoggedIn;
+   },
+ 
+@@ -500,7 +434,7 @@ LoginManager.prototype = {
+    */
+   getLoginSavingEnabled : function (host) {
+     log("Checking if logins to", host, "can be saved.");
+-    if (!this._remember || !this._storage)
++    if (!this._remember)
+       return false;
+ 
+     return this._storage.getLoginSavingEnabled(host);
+@@ -517,9 +451,6 @@ LoginManager.prototype = {
+     if (hostname.indexOf("\0") != -1)
+       throw new Error("Invalid hostname");
+ 
+-    if (!this._storage)
+-      throw new Error("No storage to set login saving enabled");
+-
+     log("Login saving for", hostname, "now enabled?", enabled);
+     return this._storage.setLoginSavingEnabled(hostname, enabled);
+   },
+-- 
+2.10.1
+
diff --git a/projects/instantbird/config b/projects/instantbird/config
index f6e5e5a..1b1b424 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -128,6 +128,7 @@ input_files:
   - filename: aboutTBUpdateLogo.png
   - filename: trac-16475.mozpatch
   - filename: trac-20309.mozpatch
+  - filename: 0001-Revert-Bug-14716-HTTP-Basic-Authentication-prompt-on.mozpatch
   - filename: updater-remove-links.mozpatch
   - filename: OSX-package-as-tar.bz2.mozpatch
     enable: '[% c("var/osx") %]'





More information about the tor-commits mailing list