forked from rDrama/rDrama
master
parent
21753657a1
commit
8a2a34c659
|
@ -158,7 +158,7 @@ def logout(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sign_up_get(v):
|
def sign_up_get(v):
|
||||||
with open('./disablesignups', 'r') as f:
|
with open('./disablesignups', 'r') as f:
|
||||||
if f.read() == "yes": return "Signups are disable for the time being.", 403
|
if f.read() == "yes": return "New account registration is currently closed. Please come back later.", 403
|
||||||
|
|
||||||
if v: return redirect("/")
|
if v: return redirect("/")
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ def sign_up_get(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sign_up_post(v):
|
def sign_up_post(v):
|
||||||
with open('./disablesignups', 'r') as f:
|
with open('./disablesignups', 'r') as f:
|
||||||
if f.read() == "yes": return "Signups are disable for the time being.", 403
|
if f.read() == "yes": return "New account registration is currently closed. Please come back later.", 403
|
||||||
|
|
||||||
if v:
|
if v:
|
||||||
abort(403)
|
abort(403)
|
||||||
|
@ -261,9 +261,6 @@ def sign_up_post(v):
|
||||||
|
|
||||||
return redirect(f"/signup?{urlencode(args)}")
|
return redirect(f"/signup?{urlencode(args)}")
|
||||||
|
|
||||||
if app.config["DISABLE_SIGNUPS"]:
|
|
||||||
return new_signup("New account registration is currently closed. Please come back later.")
|
|
||||||
|
|
||||||
if now - int(form_timestamp) < 5:
|
if now - int(form_timestamp) < 5:
|
||||||
#print(f"signup fail - {username } - too fast")
|
#print(f"signup fail - {username } - too fast")
|
||||||
return new_signup("There was a problem. Please try again.")
|
return new_signup("There was a problem. Please try again.")
|
||||||
|
|
Loading…
Reference in New Issue