Fix issue where multiple users could confirm with the same email
This commit is contained in:
parent
95440504d5
commit
60dfe6b03e
@ -33,6 +33,13 @@ public final class POSTEmailTokensIdConfirm implements Handler<RoutingContext> {
|
||||
return;
|
||||
}
|
||||
|
||||
User sameEmail = SyncUtils.runBlocking(v -> User.findByConfirmedEmail(user.getPendingEmail(), v));
|
||||
|
||||
if (sameEmail != null) {
|
||||
ErrorUtils.respondInvalidInput(ctx, user.getPendingEmail() + " is already in use.");
|
||||
return;
|
||||
}
|
||||
|
||||
JsonObject requestBody = ctx.getBodyAsJson();
|
||||
String password = requestBody.getString("password");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user