зеркало из https://github.com/mozilla/gecko-dev.git
fix bug 27782, signon viewer comes up when database is still locked, r=rjc
This commit is contained in:
Родитель
a1cf99ecb3
Коммит
7fc5ce1853
|
@ -65,7 +65,9 @@ function Startup()
|
|||
pref = null;
|
||||
}
|
||||
|
||||
LoadSignons();
|
||||
if (!LoadSignons()) {
|
||||
return; /* user failed to unlock the database */
|
||||
}
|
||||
LoadReject();
|
||||
LoadNopreview();
|
||||
LoadNocapture();
|
||||
|
@ -78,6 +80,12 @@ function Startup()
|
|||
function LoadSignons()
|
||||
{
|
||||
signonList = signonviewer.GetSignonValue();
|
||||
if (signonList.length == 1) {
|
||||
/* user supplied invalid database key */
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
var delim = signonList[0];
|
||||
signonList = signonList.split(delim);
|
||||
for(var i = 1; i < signonList.length; i++)
|
||||
|
@ -89,6 +97,7 @@ function LoadSignons()
|
|||
var user = currSignon.substring(currSignon.lastIndexOf(":")+1,currSignon.length);
|
||||
AddItem("savesignonlist",[site,user],"signon_",i-1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// function : <SignonViewer.js>::DeleteSignon();
|
||||
|
|
|
@ -2851,6 +2851,7 @@ SINGSIGN_GetSignonListForViewer(nsAutoString& aSignonList)
|
|||
|
||||
/* unlock the database */
|
||||
if (SI_LoadSignonData(PR_TRUE) != 0) {
|
||||
aSignonList = "."; /* a list of length 1 tells viewer that database was not unlocked */
|
||||
/* don't display saved signons if user couldn't unlock the database */
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче