Commit 35b9b095 authored by Jared Wein's avatar Jared Wein
Browse files

Bug 1638908 - Uplift the string changes for about:logins OS reauthentication...

Bug 1638908 - Uplift the string changes for about:logins OS reauthentication to 77 for testing with Normandy. r=MattN,flod a=pascalc

Differential Revision: https://phabricator.services.mozilla.com/D75826
parent 0b3be305
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -354,22 +354,25 @@ class AboutLoginsParent extends JSWindowActorParent {
            return;
          }
          if (!token.hasPassword && OS_AUTH_ENABLED) {
            if (AppConstants.platform == "macosx") {
              // OS Auth dialogs on macOS must only provide the "reason" that the prompt
              // is being displayed.
              messageId += "-macosx";
            }
            let [
              messageText,
              captionText,
            ] = await AboutLoginsL10n.formatMessages([
            let messageText = { value: "NOT SUPPORTED" };
            let captionText = { value: "" };
            // This feature is only supported on Windows and macOS
            // but we still call in to OSKeyStore on Linux to get
            // the proper auth_details for Telemetry.
            // See bug 1614874 for Linux support.
            if (OSKeyStore.canReauth()) {
              messageId += "-" + AppConstants.platform;
              [messageText, captionText] = await AboutLoginsL10n.formatMessages(
                [
                  {
                    id: messageId,
                  },
                  {
                    id: "about-logins-os-auth-dialog-caption",
                  },
            ]);
                ]
              );
            }
            let result = await OSKeyStore.ensureLoggedIn(
              messageText.value,
              captionText.value,
+9 −8
Original line number Diff line number Diff line
@@ -1932,14 +1932,15 @@ var gPrivacyPane = {
   * Displays a dialog in which the master password may be changed.
   */
  async changeMasterPassword() {
    // Require OS authentication before the user can set a Master Password
    if (!LoginHelper.isMasterPasswordSet() && OS_AUTH_ENABLED) {
      let messageId = "master-password-os-auth-dialog-message";
      if (AppConstants.platform == "macosx") {
        // MacOS requires a special format of this dialog string.
        // See preferences.ftl for more information.
        messageId += "-macosx";
      }
    // Require OS authentication before the user can set a Master Password.
    // OS reauthenticate functionality is not available on Linux yet (bug 1527745)
    if (
      !LoginHelper.isMasterPasswordSet() &&
      OS_AUTH_ENABLED &&
      OSKeyStore.canReauth()
    ) {
      let messageId =
        "master-password-os-auth-dialog-message-" + AppConstants.platform;
      let [messageText, captionText] = await L10n.formatMessages([
        {
          id: messageId,
+9 −9
Original line number Diff line number Diff line
@@ -108,21 +108,21 @@ about-logins-os-auth-dialog-caption = { -brand-full-name }
## and includes subtitle of "Enter password for the user "xxx" to allow this." These
## notes are only valid for English. Please test in your respected locale.

# This message can be seen by attempting to edit a login in about:logins
about-logins-edit-login-os-auth-dialog-message = Verify your identity to edit the saved login.
# This message can be seen by attempting to edit a login in about:logins
# This message can be seen when attempting to edit a login in about:logins on Windows.
about-logins-edit-login-os-auth-dialog-message-win = To edit your login, enter your Windows login credentials. This helps protect the security of your accounts.
# This message can be seen when attempting to edit a login in about:logins
# On MacOS, only provide the reason that account verification is needed. Do not put a complete sentence here.
about-logins-edit-login-os-auth-dialog-message-macosx = edit the saved login

# This message can be seen by attempting to reveal a password in about:logins
about-logins-reveal-password-os-auth-dialog-message = Verify your identity to reveal the saved password.
# This message can be seen by attempting to reveal a password in about:logins
# This message can be seen when attempting to reveal a password in about:logins on Windows.
about-logins-reveal-password-os-auth-dialog-message-win = To view your password, enter your Windows login credentials. This helps protect the security of your accounts.
# This message can be seen when attempting to reveal a password in about:logins
# On MacOS, only provide the reason that account verification is needed. Do not put a complete sentence here.
about-logins-reveal-password-os-auth-dialog-message-macosx = reveal the saved password

# This message can be seen by attempting to copy a password in about:logins
about-logins-copy-password-os-auth-dialog-message = Verify your identity to copy the saved password.
# This message can be seen by attempting to copy a password in about:logins
# This message can be seen when attempting to copy a password in about:logins on Windows.
about-logins-copy-password-os-auth-dialog-message-win = To copy your password, enter your Windows login credentials. This helps protect the security of your accounts.
# This message can be seen when attempting to copy a password in about:logins
# On MacOS, only provide the reason that account verification is needed. Do not put a complete sentence here.
about-logins-copy-password-os-auth-dialog-message-macosx = copy the saved password

+2 −2
Original line number Diff line number Diff line
@@ -938,7 +938,7 @@ forms-master-pw-fips-desc = Password Change Failed
## OS Authentication dialog

# This message can be seen by trying to add a Master Password.
master-password-os-auth-dialog-message = Verify your identity to create a Master Password.
master-password-os-auth-dialog-message-win = To create a Master Password, enter your Windows login credentials. This helps protect the security of your accounts.

# This message can be seen by trying to add a Master Password.
# The macOS strings are preceded by the operating system with "Firefox is trying to "
+19 −5
Original line number Diff line number Diff line
@@ -75,6 +75,24 @@ var OSKeyStore = {
    return !!this._pendingUnlockPromise;
  },

  canReauth() {
    // The OS auth dialog is not supported on macOS < 10.12
    // (Darwin 16) due to various issues (bug 1622304 and bug 1622303).
    // We have no support on linux (bug 1527745.)
    if (
      AppConstants.platform == "win" ||
      AppConstants.isPlatformAndVersionAtLeast("macosx", "16")
    ) {
      log.debug(
        "canReauth, returning true, this._testReauth:",
        this._testReauth
      );
      return true;
    }
    log.debug("canReauth, returning false");
    return false;
  },

  /**
   * If the test pref exists, this method will dispatch a observer message and
   * resolves to simulate successful reauth, or rejects to simulate failed reauth.
@@ -182,11 +200,7 @@ var OSKeyStore = {
        this._testReauth
      ) {
        unlockPromise = this._reauthInTests();
      } else if (
        AppConstants.platform == "win" ||
        (AppConstants.platform == "macosx" &&
          AppConstants.isPlatformAndVersionAtLeast("macosx", "16"))
      ) {
      } else if (this.canReauth()) {
        // The OS auth dialog is not supported on macOS < 10.12
        // (Darwin 16) due to various issues (bug 1622304 and bug 1622303).

Loading