Bug #285878 -->show saved passwords doesn't work for users that have never set a master password

before.
This commit is contained in:
scott%scott-macgregor.org 2005-03-17 03:06:04 +00:00
Родитель c3b76ea62b
Коммит 43efe83346
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -282,8 +282,16 @@ function ConfirmShowPasswords() {
var token = tokendb.getInternalKeyToken(); var token = tokendb.getInternalKeyToken();
// If there is no master password, still give the user a chance to opt-out of displaying passwords // If there is no master password, still give the user a chance to opt-out of displaying passwords
if (token.checkPassword("")) try
{
if (token.checkPassword(""))
return AskUserShowPasswords();
} catch (ex)
{
// for some reason the call to checkPassword throws an exception for users who have never set a master
// password before.
return AskUserShowPasswords(); return AskUserShowPasswords();
}
// So there's a master password. But since checkPassword didn't succeed, we're logged out (per nsIPK11Token.idl). // So there's a master password. But since checkPassword didn't succeed, we're logged out (per nsIPK11Token.idl).
try { try {