From f77ecd824c6f3535d615251b38b84e5039a9b840 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 7 Apr 2024 23:17:34 +0100 Subject: [PATCH] Add username to already linked error message This doesn't introduce user enumeration as GitHub username associations were already public --- app/blueprints/github/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py index f21c5563..a73b0678 100644 --- a/app/blueprints/github/__init__.py +++ b/app/blueprints/github/__init__.py @@ -85,7 +85,8 @@ def callback(oauth_token): elif userByGithub == current_user: return redirect(redirect_to) else: - flash(gettext("GitHub account is already associated with another user"), "danger") + flash(gettext("GitHub account is already associated with another user: %(username)s", + username=userByGithub.username), "danger") return redirect(redirect_to) # If not logged in, log in