Make the minimum user password length configurable
Previously, all passwords had to be at least 12 characters long. Some users use a slightly shorter password, so some instances could wish to reduce the password length limit to a slightly lesser value. This makes the minimum password length configurable in the .env file, with the MIN_PASSWORD_LENGTH variable, that defaults to 12 to keep the previous behaviour by default.
This commit is contained in:
parent
248dd78ddf
commit
09479c02ca
2 changed files with 11 additions and 1 deletions
|
@ -115,7 +115,7 @@ class RegisterController extends Controller
|
|||
'name' => 'nullable|string|max:'.config('pixelfed.max_name_length'),
|
||||
'username' => $usernameRules,
|
||||
'email' => $emailRules,
|
||||
'password' => 'required|string|min:12|confirmed',
|
||||
'password' => 'required|string|min:'.config('pixelfed.min_password_length').'|confirmed',
|
||||
];
|
||||
|
||||
return Validator::make($data, $rules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue