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:
parent
c7241ca9ea
commit
168c5a0bb2
1 changed files with 4 additions and 1 deletions
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue