Skip to content

Commit

Permalink
Prevent double confirmations from happening (CTFd#1253)
Browse files Browse the repository at this point in the history
* Prevents user from confirming their account twice
  • Loading branch information
ColdHeat authored Feb 18, 2020
1 parent 7cd8d90 commit 0bae69b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CTFd/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def confirm(data=None):
)

user = Users.query.filter_by(email=user_email).first_or_404()
if user.verified:
return redirect(url_for("views.settings"))

user.verified = True
log(
"registrations",
Expand Down

0 comments on commit 0bae69b

Please sign in to comment.