1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

check for correct username

This commit is contained in:
Lynne Megido 2019-09-22 20:10:33 +10:00
parent c7241ca9ea
commit 168c5a0bb2

View file

@ -74,7 +74,10 @@ def bot_accounts_add(mysql, cfg):
code = request.form['code'],
scopes=["read:statuses"] if session['instance_type'] == 'Mastodon' else ["read"],
)
client.account_verify_credentials()
username = client.account_verify_credentials()['username']
if username != session['username']:
error = "Incorrect username."
return render_template("bot/accounts_add.html", error = error)
except:
session['step'] = 1
error = "Authentication failed."