diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-16 12:50:41 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-16 12:50:41 -0500 |
| commit | 7494e864b42eddea0245ac5d0db79d6b0da286f6 (patch) | |
| tree | d25a3e13b207c22d8988eaa1517d09f14849960b /src | |
| parent | 58b5e97fc4310491d4301274d4895bbfca36ef0d (diff) | |
| download | invidious-7494e864b42eddea0245ac5d0db79d6b0da286f6.tar.gz invidious-7494e864b42eddea0245ac5d0db79d6b0da286f6.tar.bz2 invidious-7494e864b42eddea0245ac5d0db79d6b0da286f6.zip | |
Add handling for invalid login
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 82b8d0ed..14408a95 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -220,10 +220,13 @@ before_all do |env| sid = env.request.cookies["SID"].value - client = make_client(YT_URL) - user = get_user(sid, client, headers, PG_DB, false) + begin + client = make_client(YT_URL) + user = get_user(sid, client, headers, PG_DB, false) - env.set "user", user + env.set "user", user + rescue ex + end end end |
