WPD: disable /logged_out on .co, fixing infinite loop

WPD: fix bad asset link
WPD: redirect on migration login and failed migration login
master
justcool393 2022-10-17 19:11:50 -05:00
parent 41fd13602f
commit 39545e556f
3 changed files with 9 additions and 2 deletions

View File

@ -106,6 +106,11 @@ def auth_desired_with_logingate(f):
v = get_logged_in_user()
if app.config['SETTINGS']['login_required'] and not v: abort(401)
#### WPD TEMP #### disable this /logged_out thing on .co
if request.host == 'watchpeopledie.co':
return make_response(f(*args, v=v, **kwargs))
#### END WPD TEMP ####
if not v and not request.path.startswith('/logged_out'):
return redirect(f"/logged_out{request.full_path}")

View File

@ -24,7 +24,7 @@ def front_all(v, sub=None, subdomain=None):
if request.host == 'watchpeopledie.co':
if v and not v.admin_level: # security: don't auto login admins
hash = generate_hash(f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration')
return redirect(f'https://watchpeopledie.tv/?user={v.id}&code={hash}', 301)
return redirect(f'https://watchpeopledie.tv/logged_out?user={v.id}&code={hash}', 301)
else:
return render_template('wpdco.html')
elif request.host == 'watchpeopledie.tv' and not v: # security: don't try to login people into accounts more than once
@ -39,6 +39,8 @@ def front_all(v, sub=None, subdomain=None):
else:
if validate_hash(req_code, f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration'):
on_login(user)
return redirect('/')
return redirect('/logged_out')
#### WPD TEMP #### end special front logic
if sub:
sub = sub.strip().lower()

View File

@ -55,7 +55,7 @@
<div class="center">
<div class="col-10 col-md-5">
<div class="text-center px-3 my-8">
<img src="assets/images/WPDBYE_w_text_2.png">
<img src="assets/images/WPD/WPDBYE_w_text_2.png">
</div>
</div>
</div>