fix: set correct password condition
This commit is contained in:
parent
ae0f437e2c
commit
6f9bfd3880
@ -211,7 +211,7 @@ public class SetupController(
|
||||
[BadRequestResponse]
|
||||
public ActionResult<string> CreateAdmin([FromBody] CreateUserRequest user)
|
||||
{
|
||||
if (PasswordHashService.HasPasswordInPolicySecurity(user.Password))
|
||||
if (!PasswordHashService.HasPasswordInPolicySecurity(user.Password))
|
||||
throw new ControllerArgumentException("The password must be at least 8 characters long and contain at least one uppercase letter and one special character.");
|
||||
|
||||
if (!MailAddress.TryCreate(user.Email, out _))
|
||||
|
Loading…
Reference in New Issue
Block a user