Bug 1534290 p3 - Use correct search criteria to find original login. r=nalexander a=pascalc
authorEdouard Oger <eoger@fastmail.com>
Mon, 18 Mar 2019 16:23:04 +0000
changeset 525657 3abb046ddc034f4c04f59302012acc81154834b6
parent 525656 ca7498a112a57cecf230de625565c7adfad0df2e
child 525658 5aa8eacca7b5501cd8230c607b684c73683c41b3
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander, pascalc
bugs1534290
milestone67.0
Bug 1534290 p3 - Use correct search criteria to find original login. r=nalexander a=pascalc Depends on D23234 Differential Revision: https://phabricator.services.mozilla.com/D23235
mobile/android/chrome/content/aboutLogins.js
--- a/mobile/android/chrome/content/aboutLogins.js
+++ b/mobile/android/chrome/content/aboutLogins.js
@@ -272,26 +272,25 @@ var Logins = {
     });
   },
 
   _onSaveEditLogin: function() {
     let newUsername = document.getElementById("username").value;
     let newPassword = document.getElementById("password").value;
     let origUsername = this._selectedLogin.username;
     let origPassword = this._selectedLogin.password;
-    let origDomain = this._selectedLogin.hostname;
 
     try {
       if ((newUsername === origUsername) && (newPassword === origPassword)) {
         Snackbars.show(gStringBundle.GetStringFromName("editLogin.saved1"), Snackbars.LENGTH_LONG);
         this._showList();
         return;
       }
 
-      let logins = Services.logins.findLogins({}, origDomain, origDomain, null);
+      let logins = Services.logins.findLogins({}, this._selectedLogin.hostname, this._selectedLogin.formSubmitURL, this._selectedLogin.httpRealm);
 
       for (let i = 0; i < logins.length; i++) {
         if (logins[i].username == origUsername) {
           let propBag = Cc["@mozilla.org/hash-property-bag;1"].
             createInstance(Ci.nsIWritablePropertyBag);
           if (newUsername !== origUsername) {
             propBag.setProperty("username", newUsername);
           }