Fix referrer for setup_2fa page

This commit is contained in:
syeopite 2021-07-15 02:45:23 -07:00
parent f32f0b6e16
commit 2bf8bfd5de
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A

View File

@ -397,7 +397,7 @@ module Invidious::Routes::Account
user = env.get? "user"
sid = env.get? "sid"
referer = get_referer(env)
referer = get_referer(env, unroll: false)
if !user
return env.redirect referer
@ -425,6 +425,7 @@ module Invidious::Routes::Account
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