summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2019-02-19 18:26:33 -0600
committerOmar Roth <omarroth@hotmail.com>2019-02-19 18:26:33 -0600
commitf647f7bdea7f92d9ca9cee279cc1f58421165c88 (patch)
tree5692589aa7be62856379ac1e8e5448d7ca04aa19
parent06076c683fc4df5745933fc988f851785954157d (diff)
downloadinvidious-f647f7bdea7f92d9ca9cee279cc1f58421165c88.tar.gz
invidious-f647f7bdea7f92d9ca9cee279cc1f58421165c88.tar.bz2
invidious-f647f7bdea7f92d9ca9cee279cc1f58421165c88.zip
Clear session ids when deleting an account
-rw-r--r--src/invidious.cr1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index fa4f7ac0..1ff94929 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -1664,6 +1664,7 @@ post "/delete_account" do |env|
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
PG_DB.exec("DROP MATERIALIZED VIEW #{view_name}")
PG_DB.exec("DELETE FROM users * WHERE email = $1", user.email)
+ PG_DB.exec("DELETE FROM session_ids * WHERE email = $1", user.email)
env.request.cookies.each do |cookie|
cookie.expires = Time.new(1990, 1, 1)