From 413de9c0b1b282d3155dd9c6695a7a5dd5a4254d Mon Sep 17 00:00:00 2001 From: syeopite Date: Fri, 16 Jul 2021 14:34:31 -0700 Subject: [PATCH] Redirect to referer after 2fa removal --- src/invidious/routes/accounts.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/invidious/routes/accounts.cr b/src/invidious/routes/accounts.cr index 7047c40f..e0eb82af 100644 --- a/src/invidious/routes/accounts.cr +++ b/src/invidious/routes/accounts.cr @@ -69,6 +69,7 @@ class Invidious::Routes::Accounts < Invidious::Routes::BaseRoute end PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", nil, user.email) + env.redirect referer end # Handles requests to setup 2fa on an user account