mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add CSRF token for Google accounts
This commit is contained in:
parent
b92542ea35
commit
48526435ad
1 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,10 @@ before_all do |env|
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
user = get_user(sid, client, headers, PG_DB, false)
|
user = get_user(sid, client, headers, PG_DB, false)
|
||||||
|
|
||||||
|
challenge, token = create_response(user.email, "sign_out", HMAC_KEY, 1.week)
|
||||||
|
env.set "challenge", challenge
|
||||||
|
env.set "token", token
|
||||||
|
|
||||||
env.set "user", user
|
env.set "user", user
|
||||||
env.set "sid", sid
|
env.set "sid", sid
|
||||||
rescue ex
|
rescue ex
|
||||||
|
|
Loading…
Reference in a new issue