Skip to content

Commit

Permalink
[5.4] MSTR-237: Improve security of the monster-ui forgot password me…
Browse files Browse the repository at this point in the history
…ssage (#1234)
  • Loading branch information
pcandia committed Sep 18, 2024
1 parent 95a74f7 commit ae2445c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 61 deletions.
20 changes: 1 addition & 19 deletions src/apps/auth/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1040,25 +1040,7 @@ define(function(require) {
content.find('.reset-notification').addClass('animated fadeIn').removeClass('hidden');
},
error: function(data, error, globalHandler) {
if (error.status === 400) {
_.keys(data.data).forEach(function(val) {
if (self.i18n.active().recoverPassword.toastr.error.reset.hasOwnProperty(val)) {
monster.ui.toast({
type: 'error',
message: self.i18n.active().recoverPassword.toastr.error.reset[val]
});
} else {
if (data.data[val].hasOwnProperty('not_found')) {
monster.ui.toast({
type: 'error',
message: data.data[val].not_found
});
}
}
});
} else {
globalHandler(data);
}
globalHandler(data);
}
});
} else {
Expand Down
8 changes: 1 addition & 7 deletions src/apps/auth/i18n/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@
"reset": "Eine E-Mail wurde an die von Ihnen genannte Adresse gesendet. In dieser E-Mail finden Sie temporäre Anmeldedaten, mit denen Sie auf Ihren Account zugreifen können. Nachdem Sie sich angemeldet haben, müssen Sie Ihr Kennwort ändern/aktualisieren."
},
"error": {
"reset": {
"account_name": "Der angegebene Account-Name konnte nicht gefunden werden",
"account_realm": "Der angegebene Account-Bereich konnte nicht gefunden werden",
"phone_number": "Die angegebene Telefonnummer konnte nicht gefunden werden",
"username": "Der angegebene Benutzername konnte nicht gefunden werden"
},
"missing": "Bitte geben Sie einen Account-Namen oder eine Telefonnummer ein, die mit Ihrem Account verknüpft sind"
}
},
Expand Down Expand Up @@ -157,4 +151,4 @@
"__comment": "UI-2921: Möglichkeit zum Annehmen der Identität von Benutzern hinzugefügt",
"__version": "4.2",
"confirmUserMasquerading": "Möchten Sie wirklich die Identität des Benutzers „{{userName}}“ annehmen? Wenn ja, wird die Benutzeroberfläche komplett neu geladen und Sie müssen Sie erneut anmelden, um wieder in Ihren ursprünglichen Account zu gelangen. Vorgang trotzdem fortsetzen?"
}
}
8 changes: 1 addition & 7 deletions src/apps/auth/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,10 @@
"reset": "An email has been sent to the address you provided. Please check that email for temporary credentials that you can use to access your account. Once signed in, you will need to change/update your password."
},
"error": {
"reset": {
"account_name": "The account name provided could not be found",
"account_realm": "The account realm provided could not be found",
"phone_number": "The phone number provided could not be found",
"username": "The username provided could not be found"
},
"missing": "Please input either an account name or a phone number linked to your account"
}
},
"successReset": "An email has been sent to the address you provided. Please check that email for temporary credentials that you can use to access your account. Once signed in, you will need to change/update your password.",
"successReset": "If the information matches a user account, an email will be sent with details on how to reset your password.",
"headline": "In order to recover your password, please enter your email/username:",
"emailPlaceholder": "Email/Username",
"headline2": "And one of the following (only one is required):",
Expand Down
6 changes: 0 additions & 6 deletions src/apps/auth/i18n/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@
"reset": "Votre mot de passe a été réinitialisé avec succès. Un email a été envoyé à votre adresse de login."
},
"error": {
"reset": {
"account_name": "Le nom de compte fourni n'a pas pu être trouvé",
"account_realm": "Le royaume de compte fourni n'a pas pu être trouvé",
"phone_number": "Le numéro de téléphone fourni n'a pas pu être trouvé",
"username": "Le nom d'utilisateur founi n'a pas pu être trouvé"
},
"missing": "Veuillez spécifier un nom de compte ou un numéro de téléphone lié à votre compte"
}
},
Expand Down
26 changes: 10 additions & 16 deletions src/apps/auth/i18n/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,16 @@
"text": "Geef aub uw gebruikersnaam plus een account realm of een telefoonnummer uit uw account op."
},
"button": {
"recover": "Herstel Wachtwoord"
},
"toastr": {
"success": {
"reset": "Uw wachtwoord is succesvol hersteld"
},
"error": {
"reset": {
"account_name": "De opgegeven account naam werd niet gevonden",
"account_realm": "De opgegeven account realm werd niet gevonden",
"phone_number": "Het opgegeven telefoonnummer werd niet gevonden",
"username": "De opgegeven gebruikersnaam werd niet gevonden"
},
"missing": "Geef aub een account naam, account realm of een telefoonnummer uit uw account in"
}
}
"recover": "Herstel Wachtwoord"
},
"toastr": {
"success": {
"reset": "Uw wachtwoord is succesvol hersteld"
},
"error": {
"missing": "Geef aub een account naam, account realm of een telefoonnummer uit uw account in"
}
}
},
"passwordUpdate": {
"title": "Wachtwoord Bijwerken",
Expand Down
6 changes: 0 additions & 6 deletions src/apps/auth/i18n/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@
"reset": "Ваш пароль был успешно сброшен"
},
"error": {
"reset": {
"account_name": "Название (код) клиента не был найден",
"account_realm": "SIP-домен (realm) не был найден",
"phone_number": "Телефонный номер не был найден",
"username": "Имя пользователя не было найдено"
},
"missing": "Пожалуйста, введиту название (код) клиента, или SIP-домен (realm) или телефонный номер, привязанный к вашей учётной записи клиента"
}
}
Expand Down

0 comments on commit ae2445c

Please sign in to comment.