From 174bce037f9d1d848bfb19f32c322457902c5d84 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Tue, 18 Oct 2022 06:42:43 -0500 Subject: [PATCH] WPD migration: don't include AutoJanny, Snappy, or other bots --- files/routes/front.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index f1d9842676..775281a417 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -22,7 +22,7 @@ def front_all(v, sub=None, subdomain=None): from datetime import datetime now = datetime.utcnow() if request.host == 'watchpeopledie.co': - if v and not v.admin_level: # security: don't auto login admins + if v and not v.admin_level and not v.id <= 9: # security: don't auto login admins or bots hash = generate_hash(f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration') return redirect(f'https://watchpeopledie.tv/logged_out?user={v.id}&code={hash}', 301) else: @@ -34,7 +34,7 @@ def front_all(v, sub=None, subdomain=None): from files.routes.login import on_login user = get_account(req_user, graceful=True) if user: - if user.admin_level: + if user.admin_level or user.id <= 9: abort(401) else: if validate_hash(req_code, f'{user.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration'):