forked from MarseyWorld/MarseyWorld
WPD: disable /logged_out on .co, fixing infinite loop
WPD: fix bad asset link WPD: redirect on migration login and failed migration loginmaster
parent
41fd13602f
commit
39545e556f
|
@ -106,6 +106,11 @@ def auth_desired_with_logingate(f):
|
||||||
v = get_logged_in_user()
|
v = get_logged_in_user()
|
||||||
if app.config['SETTINGS']['login_required'] and not v: abort(401)
|
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'):
|
if not v and not request.path.startswith('/logged_out'):
|
||||||
return redirect(f"/logged_out{request.full_path}")
|
return redirect(f"/logged_out{request.full_path}")
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ def front_all(v, sub=None, subdomain=None):
|
||||||
if request.host == 'watchpeopledie.co':
|
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: # security: don't auto login admins
|
||||||
hash = generate_hash(f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration')
|
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:
|
else:
|
||||||
return render_template('wpdco.html')
|
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
|
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:
|
else:
|
||||||
if validate_hash(req_code, f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration'):
|
if validate_hash(req_code, f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration'):
|
||||||
on_login(user)
|
on_login(user)
|
||||||
|
return redirect('/')
|
||||||
|
return redirect('/logged_out')
|
||||||
#### WPD TEMP #### end special front logic
|
#### WPD TEMP #### end special front logic
|
||||||
if sub:
|
if sub:
|
||||||
sub = sub.strip().lower()
|
sub = sub.strip().lower()
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<div class="col-10 col-md-5">
|
<div class="col-10 col-md-5">
|
||||||
<div class="text-center px-3 my-8">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue