Bug 449810 – legacy storage module should throw on canceled master password entry in getAllLogins. r=dolske

This commit is contained in:
Paul O'Shannessy 2008-08-08 16:04:27 -07:00
parent 184d478d40
commit 055353d090
2 changed files with 15 additions and 3 deletions

View File

@ -97,7 +97,11 @@ var signonsTreeView = {
function LoadSignons() {
// loads signons into table
signons = passwordmanager.getAllLogins({});
try {
signons = passwordmanager.getAllLogins({});
} catch (e) {
signons = [];
}
signonsTreeView.rowCount = signons.length;
// sort and display the table
@ -204,8 +208,13 @@ function FinalizeSignonDeletions(syncNeeded) {
}
// If the deletion has been performed in a filtered view, reflect the deletion in the unfiltered table.
// See bug 405389.
if (syncNeeded)
signons = passwordmanager.getAllLogins({});
if (syncNeeded) {
try {
signons = passwordmanager.getAllLogins({});
} catch (e) {
signons = [];
}
}
deletedSignons.length = 0;
}

View File

@ -316,6 +316,9 @@ LoginManagerStorage_legacy.prototype = {
// decrypt entries for caller.
[result, userCanceled] = this._decryptLogins(result);
if (userCanceled)
throw "User canceled Master Password entry";
count.value = result.length; // needed for XPCOM
return result;
},