Skip to content

Commit

Permalink
Add recaptcha validation on password reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Mar 29, 2021
1 parent 3f75003 commit 4779ffe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/faforever/api/user/UsersController.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public void changeEmail(HttpServletRequest request,

@ApiOperation("Sends a password reset request to the username OR email linked by this account.")
@PostMapping(path = "/requestPasswordReset", produces = APPLICATION_JSON_VALUE)
public void requestPasswordReset(@RequestParam("identifier") String identifier) {
public void requestPasswordReset(@RequestParam("identifier") String identifier,
@RequestParam(value = "recaptchaResponse", required = false) String recaptchaResponse) {
recaptchaService.validateResponse(recaptchaResponse);
userService.requestPasswordReset(identifier);
}

Expand Down

0 comments on commit 4779ffe

Please sign in to comment.