mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Fix referrer for setup_2fa page
This commit is contained in:
parent
946275c187
commit
7ae327966c
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,7 @@ class Invidious::Routes::Accounts < Invidious::Routes::BaseRoute
|
|||
|
||||
user = env.get? "user"
|
||||
sid = env.get? "sid"
|
||||
referer = get_referer(env)
|
||||
referer = get_referer(env, unroll: false)
|
||||
|
||||
user = user.as(User)
|
||||
sid = sid.as(String)
|
||||
|
@ -92,6 +92,7 @@ class Invidious::Routes::Accounts < Invidious::Routes::BaseRoute
|
|||
end
|
||||
|
||||
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", db_secret.to_s, user.email)
|
||||
env.redirect referer
|
||||
end
|
||||
|
||||
# Validate 2fa code endpoint
|
||||
|
|
Loading…
Reference in a new issue