mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-29 07:58:35 +00:00
Fix referrer for setup_2fa page
This commit is contained in:
parent
f32f0b6e16
commit
2bf8bfd5de
@ -397,7 +397,7 @@ module Invidious::Routes::Account
|
|||||||
|
|
||||||
user = env.get? "user"
|
user = env.get? "user"
|
||||||
sid = env.get? "sid"
|
sid = env.get? "sid"
|
||||||
referer = get_referer(env)
|
referer = get_referer(env, unroll: false)
|
||||||
|
|
||||||
if !user
|
if !user
|
||||||
return env.redirect referer
|
return env.redirect referer
|
||||||
@ -425,6 +425,7 @@ module Invidious::Routes::Account
|
|||||||
end
|
end
|
||||||
|
|
||||||
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", db_secret.to_s, user.email)
|
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", db_secret.to_s, user.email)
|
||||||
|
env.redirect referer
|
||||||
end
|
end
|
||||||
|
|
||||||
# Validate 2fa code endpoint
|
# Validate 2fa code endpoint
|
||||||
|
Loading…
Reference in New Issue
Block a user