From 9a1dbedb4cf869cdfc783dd0e7f7d754e4e68c6c Mon Sep 17 00:00:00 2001 From: Magnus Melin Date: Sat, 14 Nov 2020 11:30:36 +0200 Subject: [PATCH] Bug 1653517 - disable OS reauth for Tunderbird non-nightly builds. r=Paenglab --- mail/app/profile/all-thunderbird.js | 6 ++++++ mail/components/preferences/passwordManager.js | 5 ++++- mail/components/preferences/privacy.js | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mail/app/profile/all-thunderbird.js b/mail/app/profile/all-thunderbird.js index df89540e67..ae655c2a9e 100644 --- a/mail/app/profile/all-thunderbird.js +++ b/mail/app/profile/all-thunderbird.js @@ -111,6 +111,12 @@ pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/%APP%/ // Show error messages in error console. pref("javascript.options.showInConsole", true); +#ifdef NIGHTLY_BUILD +pref("signon.management.page.os-auth.enabled", true); +#else +pref("signon.management.page.os-auth.enabled", false); +#endif + // Controls enabling of the extension system logging (can reduce performance) pref("extensions.logging.enabled", false); pref("extensions.overlayloader.loglevel", "warn"); diff --git a/mail/components/preferences/passwordManager.js b/mail/components/preferences/passwordManager.js index 6cba72e765..d75b5537f1 100644 --- a/mail/components/preferences/passwordManager.js +++ b/mail/components/preferences/passwordManager.js @@ -780,7 +780,10 @@ async function masterPasswordLogin(noPasswordCallback) { if (token.checkPassword("")) { // The OS re-authentication on Linux isn't working (Bug 1527745), // still add the confirm dialog for Linux. - if (AppConstants.platform !== "linux") { + if ( + Services.prefs.getBoolPref("signon.management.page.os-auth.enabled") && + AppConstants.platform !== "linux" + ) { // Require OS authentication before the user can show the passwords or copy them. let messageId = "password-os-auth-dialog-message"; if (AppConstants.platform == "macosx") { diff --git a/mail/components/preferences/privacy.js b/mail/components/preferences/privacy.js index dc3ccb2f4b..a787c35c7f 100644 --- a/mail/components/preferences/privacy.js +++ b/mail/components/preferences/privacy.js @@ -368,6 +368,7 @@ var gPrivacyPane = { // OS reauthenticate functionality is not available on Linux yet (bug 1527745) if ( !LoginHelper.isMasterPasswordSet() && + Services.prefs.getBoolPref("signon.management.page.os-auth.enabled") && AppConstants.platform != "linux" ) { let messageId =