Add username to already linked error message

This doesn't introduce user enumeration as GitHub
username associations were already public
This commit is contained in:
rubenwardy 2024-04-07 23:17:34 +01:00
parent 465370d3fc
commit f77ecd824c

@ -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