зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 29a0b5a4c69f (bug 1642267) for XPCShell in toolkit/modules/tests/xpcshell/test_osKeyStore.js
This commit is contained in:
Родитель
932ae4e653
Коммит
d4d0bdae4f
|
@ -1218,7 +1218,6 @@ this.LoginHelper = {
|
|||
object: "os_auth",
|
||||
method: "reauthenticate",
|
||||
value: result.auth_details,
|
||||
extra: result.auth_details_extra,
|
||||
};
|
||||
return {
|
||||
isAuthorized,
|
||||
|
|
|
@ -642,22 +642,17 @@ pwmgr:
|
|||
"success_disabled" is used when the feature is disabled.
|
||||
"success_unsupported_platform" should be set when the user attempts to authenticate on an unsupported platform.
|
||||
"success_no_password" should be used when the user doesn't have an OS password set.
|
||||
"success_auto_admin_logon" should be used when the user has enabled the "AutoAdminLogon" registry key
|
||||
"fail" should be used when the user cancels the authentication prompt or an unexpected exception is encountered. The user may or may not have provided an incorrect password before cancelling.
|
||||
objects: [
|
||||
"master_password",
|
||||
"os_auth",
|
||||
]
|
||||
methods: ["reauthenticate"]
|
||||
extra_keys:
|
||||
auto_admin: >
|
||||
If the AutoAdminLogon Windows feature is enabled. This feature disables password prompt when logging in to Windows.
|
||||
require_signon: >
|
||||
If the Power Settings on Windows are configured to prompt for password upon resuming from sleep.
|
||||
bug_numbers:
|
||||
- 1628029
|
||||
- 1623745
|
||||
- 1636729
|
||||
- 1642267
|
||||
expiry_version: never
|
||||
notification_emails: ["loines@mozilla.com", "passwords-dev@mozilla.org", "jaws@mozilla.com"]
|
||||
release_channel_collection: opt-out
|
||||
|
|
|
@ -206,27 +206,27 @@ var OSKeyStore = {
|
|||
unlockPromise = osReauthenticator
|
||||
.asyncReauthenticateUser(reauth, dialogCaption, parentWindow)
|
||||
.then(reauthResult => {
|
||||
let auth_details_extra = {};
|
||||
if (reauthResult.length > 3) {
|
||||
auth_details_extra.auto_admin = "" + !!reauthResult[2];
|
||||
auth_details_extra.require_signon = "" + !!reauthResult[3];
|
||||
}
|
||||
if (!reauthResult[0]) {
|
||||
throw new Components.Exception(
|
||||
"User canceled OS reauth entry",
|
||||
Cr.NS_ERROR_FAILURE,
|
||||
null,
|
||||
auth_details_extra
|
||||
Cr.NS_ERROR_FAILURE
|
||||
);
|
||||
}
|
||||
let result = {
|
||||
authenticated: true,
|
||||
auth_details: "success",
|
||||
auth_details_extra,
|
||||
};
|
||||
if (reauthResult.length > 1 && reauthResult[1]) {
|
||||
result.auth_details += "_no_password";
|
||||
}
|
||||
if (reauthResult.length > 3) {
|
||||
if (reauthResult[2]) {
|
||||
result.auth_details += "_auto_admin_logon";
|
||||
}
|
||||
if (!reauthResult[3]) {
|
||||
result.auth_details += "_require_signon_disabled";
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
} else {
|
||||
|
@ -274,12 +274,7 @@ var OSKeyStore = {
|
|||
this._pendingUnlockPromise = null;
|
||||
this._isLocked = true;
|
||||
|
||||
return {
|
||||
authenticated: false,
|
||||
auth_details: "fail",
|
||||
auth_details_extra: err.data.QueryInterface(Ci.nsISupports)
|
||||
.wrappedJSObject,
|
||||
};
|
||||
return { authenticated: false, auth_details: "fail" };
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче