forked from MarseyWorld/MarseyWorld
fix additional error due to flask patch
parent
3f7a15c431
commit
a9a68ae79d
|
@ -30,6 +30,7 @@ def cron_fn(every_5m, every_1d):
|
|||
with app.app_context():
|
||||
g.db = db_session()
|
||||
g.v = None
|
||||
g.vid = None
|
||||
|
||||
try:
|
||||
if every_5m:
|
||||
|
|
|
@ -10,6 +10,7 @@ from files.__main__ import app, limiter, get_CF, redis_instance
|
|||
@app.before_request
|
||||
def before_request():
|
||||
g.v = None
|
||||
g.vid = None
|
||||
|
||||
if request.host != SITE:
|
||||
abort(403, "Unauthorized host provided!")
|
||||
|
|
|
@ -115,6 +115,7 @@ def on_login(account, redir=None):
|
|||
session.permanent = True
|
||||
session["lo_user"] = account.id
|
||||
g.v = account
|
||||
g.vid = account.id
|
||||
session["login_nonce"] = account.login_nonce
|
||||
check_for_alts(account, include_current_session=True)
|
||||
|
||||
|
@ -341,6 +342,7 @@ def sign_up_post(v):
|
|||
session.permanent = True
|
||||
session["lo_user"] = new_user.id
|
||||
g.v = new_user
|
||||
g.vid = new_user.id
|
||||
|
||||
check_for_alts(new_user, include_current_session=True)
|
||||
send_notification(new_user.id, WELCOME_MSG)
|
||||
|
|
|
@ -107,6 +107,7 @@ def get_logged_in_user():
|
|||
abort(403, "Site is in offline mode right now. It will be back shortly!")
|
||||
|
||||
g.v = v
|
||||
g.vid = v.id
|
||||
|
||||
if not v and SITE == 'rdrama.net' and request.headers.get("Cf-Ipcountry") == 'EG':
|
||||
abort(404)
|
||||
|
|
Loading…
Reference in New Issue