From 0bae69bee47973ec83734c1a6a67546b3f96e9a1 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Mon, 17 Feb 2020 21:46:24 -0500 Subject: [PATCH] Prevent double confirmations from happening (#1253) * Prevents user from confirming their account twice --- CTFd/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CTFd/auth.py b/CTFd/auth.py index 133e21e..10ecfe1 100644 --- a/CTFd/auth.py +++ b/CTFd/auth.py @@ -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",