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
parent
d08670270e
commit
6f43b480b1
|
|
@ -69,7 +69,7 @@ class ForgotPassword extends Component
|
||||||
$this->validate([
|
$this->validate([
|
||||||
'email' => ['required', 'email'],
|
'email' => ['required', 'email'],
|
||||||
'code' => ['required', 'string'],
|
'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
|
// Tight per-(email+IP) bucket PLUS an IP-independent per-account backstop: this reset
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class PasswordChange extends Component
|
||||||
try {
|
try {
|
||||||
$this->validate([
|
$this->validate([
|
||||||
'current' => ['required', 'current_password'],
|
'current' => ['required', 'current_password'],
|
||||||
'password' => ['required', 'confirmed', Password::min(12)->mixedCase()->numbers()],
|
'password' => ['required', 'confirmed', Password::min(6)->mixedCase()->numbers()],
|
||||||
], attributes: [
|
], attributes: [
|
||||||
'current' => __('auth.attr_current_password'),
|
'current' => __('auth.attr_current_password'),
|
||||||
'password' => __('auth.attr_new_password'),
|
'password' => __('auth.attr_new_password'),
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class ResetPassword extends Component
|
||||||
{
|
{
|
||||||
$this->validate([
|
$this->validate([
|
||||||
'email' => ['required', 'email'],
|
'email' => ['required', 'email'],
|
||||||
'password' => ['required', 'confirmed', PasswordRule::min(12)->mixedCase()->numbers()],
|
'password' => ['required', 'confirmed', PasswordRule::min(6)->mixedCase()->numbers()],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$status = Password::reset(
|
$status = Password::reset(
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class CreateUser extends ModalComponent
|
||||||
'name' => ['required', 'string', 'max:120'],
|
'name' => ['required', 'string', 'max:120'],
|
||||||
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users', 'email')],
|
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users', 'email')],
|
||||||
// Optional — when set it must meet the same strength as a self-chosen password.
|
// 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()],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class Profile extends Component
|
||||||
try {
|
try {
|
||||||
$this->validate([
|
$this->validate([
|
||||||
'current_password' => ['required', 'current_password'],
|
'current_password' => ['required', 'current_password'],
|
||||||
'password' => ['required', 'confirmed', Password::min(12)->mixedCase()->numbers()],
|
'password' => ['required', 'confirmed', Password::min(6)->mixedCase()->numbers()],
|
||||||
]);
|
]);
|
||||||
} catch (ValidationException $e) {
|
} catch (ValidationException $e) {
|
||||||
if (array_key_exists('current_password', $e->errors())) {
|
if (array_key_exists('current_password', $e->errors())) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ return [
|
||||||
'email_placeholder' => 'erika@example.com',
|
'email_placeholder' => 'erika@example.com',
|
||||||
'password_label' => 'Passwort',
|
'password_label' => 'Passwort',
|
||||||
'password_placeholder' => 'Leer = Einmal-Passwort erzeugen',
|
'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.',
|
'created_notify' => 'Konto :name angelegt.',
|
||||||
'create_submit' => 'Konto anlegen',
|
'create_submit' => 'Konto anlegen',
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ return [
|
||||||
// ── Password change ──────────────────────────────────────────────────
|
// ── Password change ──────────────────────────────────────────────────
|
||||||
'security' => 'Sicherheit',
|
'security' => 'Sicherheit',
|
||||||
'password_change_heading' => 'Passwort ändern',
|
'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',
|
'current_password' => 'Aktuelles Passwort',
|
||||||
'new_password' => 'Neues Passwort',
|
'new_password' => 'Neues Passwort',
|
||||||
'confirm_new_password' => 'Neues Passwort bestätigen',
|
'confirm_new_password' => 'Neues Passwort bestätigen',
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ return [
|
||||||
'email_placeholder' => 'jane@example.com',
|
'email_placeholder' => 'jane@example.com',
|
||||||
'password_label' => 'Password',
|
'password_label' => 'Password',
|
||||||
'password_placeholder' => 'Blank = generate a one-time 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.',
|
'created_notify' => 'Account :name created.',
|
||||||
'create_submit' => 'Create account',
|
'create_submit' => 'Create account',
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ return [
|
||||||
// ── Password change ──────────────────────────────────────────────────
|
// ── Password change ──────────────────────────────────────────────────
|
||||||
'security' => 'Security',
|
'security' => 'Security',
|
||||||
'password_change_heading' => 'Change password',
|
'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',
|
'current_password' => 'Current password',
|
||||||
'new_password' => 'New password',
|
'new_password' => 'New password',
|
||||||
'confirm_new_password' => 'Confirm new password',
|
'confirm_new_password' => 'Confirm new password',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue