Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic password reset #730

Merged
merged 4 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions app/Http/Controllers/Auth/PasswordResetLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,8 @@ public function store(Request $request): JsonResponse
])
->log('password.reset.request');

if ($status != Password::RESET_LINK_SENT) {
throw ValidationException::withMessages([
'email' => [__($status)],
]);
}

return response()->json(['status' => __($status)]);
// for the user, we always want to return the same messsage
// to prevent user enumeration
return response()->json(['status' => __('passwords.recovery')]);
}
}
38 changes: 19 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lang/en/passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"sent" => "We have emailed your password reset link!",
"throttled" => "Please wait before retrying.",
"token" => "This password reset token is invalid.",
"user" => "We can't find a user with that email address."
"user" => "We can't find a user with that email address.",
"recovery" => "If the email address is registered, you will receive an email with instructions on how to reset your password.",
];
3 changes: 2 additions & 1 deletion lang/fr/passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"sent" => "Nous avons envoyé votre lien de réinitialisation de mot de passe par courriel.",
"throttled" => "Veuillez attendre avant de réessayer.",
"token" => "Ce jeton de réinitialisation de mot de passe n'est pas valide.",
"user" => "Nous ne pouvons pas trouver un utilisateur avec ce courriel."
"user" => "Nous ne pouvons pas trouver un utilisateur avec ce courriel.",
"recovery" => "Si l'adresse courriel est enregistrée, vous recevrez un courriel avec des instructions sur la façon de réinitialiser votre mot de passe.",
];
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@quasar/extras": "^1.16.12",
"@vitejs/plugin-vue": "^5.1.2",
"@vueuse/core": "^11.0.1",
"@vueuse/core": "^11.0.3",
"dompurify": "^3.1.6",
"pinia": "^2.2.2",
"quasar": "^2.16.9",
Expand All @@ -21,13 +21,13 @@
"vue-router": "^4.4.3"
},
"devDependencies": {
"@antfu/eslint-config": "^2.27.0",
"@antfu/eslint-config": "^2.27.1",
"@quasar/vite-plugin": "^1.7.0",
"@types/dompurify": "^3.0.5",
"@types/node": "^22.5.0",
"axios": "^1.7.4",
"axios": "^1.7.5",
"cypress": "^13.13.3",
"eslint": "^9.9.0",
"eslint": "^9.9.1",
"eslint-plugin-quasar": "^1.1.0",
"globals": "^15.9.0",
"laravel-vite-plugin": "^1.0.5",
Expand Down
Loading
Loading