[MM-57942] Fix a panic on password is too long (#27449)

* return error from bcrypt, handle gracefully; remove dead code

* linting

* linting

* i18n

* fix test

* fill out translations
Этот коммит содержится в:
Christopher Poile
2024-07-03 17:58:26 -04:00
коммит произвёл GitHub
родитель 5d2bf1ea1c
Коммит cc5e87ae24
8 изменённых файлов: 54 добавлений и 30 удалений

Просмотреть файл

@@ -4146,6 +4146,10 @@
"id": "api.user.update_password.oauth.app_error",
"translation": "Update password failed because the user is logged in through an OAuth service."
},
{
"id": "api.user.update_password.password_hash.app_error",
"translation": "There was an internal error saving the password."
},
{
"id": "api.user.update_password.user_and_hashed.app_error",
"translation": "Only system administrators can set already-hashed passwords."
@@ -9758,6 +9762,14 @@
"id": "model.user.is_valid.username.app_error",
"translation": "Username must begin with a letter, and contain between 3 to 22 lowercase characters made up of numbers, letters, and the symbols \".\", \"-\", and \"_\"."
},
{
"id": "model.user.pre_save.password_hash.app_error",
"translation": "There was an internal error saving the password."
},
{
"id": "model.user.pre_save.password_too_long.app_error",
"translation": "Your password must contain no more than 72 characters."
},
{
"id": "model.user_access_token.is_valid.description.app_error",
"translation": "Invalid description, must be 255 or less characters."