feat(auth): lower the password minimum from 12 to 6 characters

Operator decision — 12 was too long; 6 is acceptable and password strength is the user's
own responsibility. Changed Password::min(12) → min(6) in every place that validates a
password (password change, forgot/reset, settings profile, create-user) and updated the
visible hints (de + en). The upper/lowercase + digit complexity is unchanged — only the
minimum length was flagged.

Verified: a 6-char complex password ("Abc123") now validates; too-short and complexity-less
passwords still reject; the password page shows "min. 6"; full suite 467 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/v1-foundation
boban 2026-06-25 21:19:41 +02:00
parent d08670270e
commit 6f43b480b1
9 changed files with 9 additions and 9 deletions

View File

@ -69,7 +69,7 @@ class ForgotPassword extends Component
$this->validate([
'email' => ['required', 'email'],
'code' => ['required', 'string'],
'password' => ['required', 'confirmed', Password::min(12)->mixedCase()->numbers()],
'password' => ['required', 'confirmed', Password::min(6)->mixedCase()->numbers()],
]);
// Tight per-(email+IP) bucket PLUS an IP-independent per-account backstop: this reset

View File

@ -34,7 +34,7 @@ class PasswordChange extends Component
try {
$this->validate([
'current' => ['required', 'current_password'],
'password' => ['required', 'confirmed', Password::min(12)->mixedCase()->numbers()],
'password' => ['required', 'confirmed', Password::min(6)->mixedCase()->numbers()],
], attributes: [
'current' => __('auth.attr_current_password'),
'password' => __('auth.attr_new_password'),

View File

@ -34,7 +34,7 @@ class ResetPassword extends Component
{
$this->validate([
'email' => ['required', 'email'],
'password' => ['required', 'confirmed', PasswordRule::min(12)->mixedCase()->numbers()],
'password' => ['required', 'confirmed', PasswordRule::min(6)->mixedCase()->numbers()],
]);
$status = Password::reset(

View File

@ -46,7 +46,7 @@ class CreateUser extends ModalComponent
'name' => ['required', 'string', 'max:120'],
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users', 'email')],
// Optional — when set it must meet the same strength as a self-chosen password.
'password' => ['nullable', 'string', Password::min(12)->mixedCase()->numbers()],
'password' => ['nullable', 'string', Password::min(6)->mixedCase()->numbers()],
];
}

View File

@ -54,7 +54,7 @@ class Profile extends Component
try {
$this->validate([
'current_password' => ['required', 'current_password'],
'password' => ['required', 'confirmed', Password::min(12)->mixedCase()->numbers()],
'password' => ['required', 'confirmed', Password::min(6)->mixedCase()->numbers()],
]);
} catch (ValidationException $e) {
if (array_key_exists('current_password', $e->errors())) {

View File

@ -23,7 +23,7 @@ return [
'email_placeholder' => 'erika@example.com',
'password_label' => 'Passwort',
'password_placeholder' => 'Leer = Einmal-Passwort erzeugen',
'password_hint' => 'Optional. Min. 12 Zeichen, Groß-/Kleinschreibung + Zahl. Leer lassen, um ein sicheres Einmal-Passwort zu erzeugen.',
'password_hint' => 'Optional. Min. 6 Zeichen, Groß-/Kleinschreibung + Zahl. Leer lassen, um ein sicheres Einmal-Passwort zu erzeugen.',
'created_notify' => 'Konto :name angelegt.',
'create_submit' => 'Konto anlegen',

View File

@ -20,7 +20,7 @@ return [
// ── Password change ──────────────────────────────────────────────────
'security' => 'Sicherheit',
'password_change_heading' => 'Passwort ändern',
'password_change_subtitle' => 'Lege ein eigenes Passwort fest (min. 12 Zeichen, Groß-/Kleinschreibung + Zahl).',
'password_change_subtitle' => 'Lege ein eigenes Passwort fest (min. 6 Zeichen, Groß-/Kleinschreibung + Zahl).',
'current_password' => 'Aktuelles Passwort',
'new_password' => 'Neues Passwort',
'confirm_new_password' => 'Neues Passwort bestätigen',

View File

@ -23,7 +23,7 @@ return [
'email_placeholder' => 'jane@example.com',
'password_label' => 'Password',
'password_placeholder' => 'Blank = generate a one-time password',
'password_hint' => 'Optional. Min. 12 characters, upper/lowercase + a digit. Leave blank to generate a secure one-time password.',
'password_hint' => 'Optional. Min. 6 characters, upper/lowercase + a digit. Leave blank to generate a secure one-time password.',
'created_notify' => 'Account :name created.',
'create_submit' => 'Create account',

View File

@ -20,7 +20,7 @@ return [
// ── Password change ──────────────────────────────────────────────────
'security' => 'Security',
'password_change_heading' => 'Change password',
'password_change_subtitle' => 'Set your own password (min. 12 characters, upper/lowercase + a digit).',
'password_change_subtitle' => 'Set your own password (min. 6 characters, upper/lowercase + a digit).',
'current_password' => 'Current password',
'new_password' => 'New password',
'confirm_new_password' => 'Confirm new password',