mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Clear session ids when deleting an account
This commit is contained in:
parent
06076c683f
commit
f647f7bdea
1 changed files with 1 additions and 0 deletions
|
@ -1664,6 +1664,7 @@ post "/delete_account" do |env|
|
||||||
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
||||||
PG_DB.exec("DROP MATERIALIZED VIEW #{view_name}")
|
PG_DB.exec("DROP MATERIALIZED VIEW #{view_name}")
|
||||||
PG_DB.exec("DELETE FROM users * WHERE email = $1", user.email)
|
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|
|
env.request.cookies.each do |cookie|
|
||||||
cookie.expires = Time.new(1990, 1, 1)
|
cookie.expires = Time.new(1990, 1, 1)
|
||||||
|
|
Loading…
Reference in a new issue