From 96e6d6612059549273870502dcc59ee64144d73b Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Fri, 14 Oct 2022 04:26:00 -0400 Subject: [PATCH] Fix issue where users could login to their team even though they were already on the team (#2198) * Fix issue where users couldn't login to their team even though they were already on the team --- CTFd/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTFd/auth.py b/CTFd/auth.py index ce01324f..3bbb5fa9 100644 --- a/CTFd/auth.py +++ b/CTFd/auth.py @@ -512,7 +512,7 @@ def oauth_redirect(): ) return redirect(url_for("auth.login")) - if get_config("user_mode") == TEAMS_MODE: + if get_config("user_mode") == TEAMS_MODE and user.team_id is None: team_id = api_data["team"]["id"] team_name = api_data["team"]["name"]