Enhance password policy and update hints for user registration
- Updated password requirements in the dependency injection configuration to enforce the use of at least one digit and one uppercase letter. - Modified password hint messages in both Russian and English to reflect the new password policy, ensuring clarity for users during registration.
This commit is contained in:
@@ -39,6 +39,9 @@ public static class DependencyInjection
|
|||||||
{
|
{
|
||||||
options.User.RequireUniqueEmail = false;
|
options.User.RequireUniqueEmail = false;
|
||||||
options.Password.RequiredLength = 8;
|
options.Password.RequiredLength = 8;
|
||||||
|
options.Password.RequireDigit = true;
|
||||||
|
options.Password.RequireUppercase = true;
|
||||||
|
options.Password.RequireNonAlphanumeric = false;
|
||||||
options.Lockout.MaxFailedAccessAttempts = 5;
|
options.Lockout.MaxFailedAccessAttempts = 5;
|
||||||
options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
|
options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
|
||||||
options.Lockout.AllowedForNewUsers = true;
|
options.Lockout.AllowedForNewUsers = true;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const resources = {
|
|||||||
duplicateUserName: 'Пользователь с таким именем уже существует.',
|
duplicateUserName: 'Пользователь с таким именем уже существует.',
|
||||||
genericError: 'Что-то пошло не так. Попробуйте ещё раз.',
|
genericError: 'Что-то пошло не так. Попробуйте ещё раз.',
|
||||||
userNameHint: 'Латиница, цифры, «_», «.», «-», от 3 до 32 символов.',
|
userNameHint: 'Латиница, цифры, «_», «.», «-», от 3 до 32 символов.',
|
||||||
passwordHint: 'Не менее 8 символов.',
|
passwordHint: 'Не менее 8 символов, минимум одна заглавная буква и одна цифра.',
|
||||||
or: 'или',
|
or: 'или',
|
||||||
telegramBotNotConfigured: 'Telegram-бот не настроен администратором.',
|
telegramBotNotConfigured: 'Telegram-бот не настроен администратором.',
|
||||||
waitingForConfirmation: 'Ожидание подтверждения в Telegram…',
|
waitingForConfirmation: 'Ожидание подтверждения в Telegram…',
|
||||||
@@ -289,7 +289,7 @@ const resources = {
|
|||||||
duplicateUserName: 'A user with this name already exists.',
|
duplicateUserName: 'A user with this name already exists.',
|
||||||
genericError: 'Something went wrong. Please try again.',
|
genericError: 'Something went wrong. Please try again.',
|
||||||
userNameHint: 'Latin letters, digits, "_", ".", "-", 3 to 32 characters.',
|
userNameHint: 'Latin letters, digits, "_", ".", "-", 3 to 32 characters.',
|
||||||
passwordHint: 'At least 8 characters.',
|
passwordHint: 'At least 8 characters, with one uppercase letter and one digit.',
|
||||||
or: 'or',
|
or: 'or',
|
||||||
telegramBotNotConfigured: 'The Telegram bot has not been configured by the administrator.',
|
telegramBotNotConfigured: 'The Telegram bot has not been configured by the administrator.',
|
||||||
waitingForConfirmation: 'Waiting for confirmation in Telegram…',
|
waitingForConfirmation: 'Waiting for confirmation in Telegram…',
|
||||||
|
|||||||
Reference in New Issue
Block a user