bb
This commit is contained in:
parent
607cb83327
commit
2992fbd4a2
1 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ valid_password_regex = re.compile("^.{8,100}$")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/login")
|
@app.get("/login")
|
||||||
@auth_required
|
@auth_desired
|
||||||
def login_get(v):
|
def login_get(v):
|
||||||
|
|
||||||
redir = request.values.get("redirect", "/").replace("/logged_out", "").strip()
|
redir = request.values.get("redirect", "/").replace("/logged_out", "").strip()
|
||||||
|
@ -167,7 +167,7 @@ def logout(v):
|
||||||
|
|
||||||
|
|
||||||
@app.get("/signup")
|
@app.get("/signup")
|
||||||
@auth_required
|
@auth_desired
|
||||||
def sign_up_get(v):
|
def sign_up_get(v):
|
||||||
with open('disable_signups', 'r') as f:
|
with open('disable_signups', 'r') as f:
|
||||||
if f.read() == "yes": return {"error": "New account registration is currently closed. Please come back later."}, 403
|
if f.read() == "yes": return {"error": "New account registration is currently closed. Please come back later."}, 403
|
||||||
|
@ -212,7 +212,7 @@ def sign_up_get(v):
|
||||||
@app.post("/signup")
|
@app.post("/signup")
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("1/second")
|
||||||
@limiter.limit("5/day")
|
@limiter.limit("5/day")
|
||||||
@auth_required
|
@auth_desired
|
||||||
def sign_up_post(v):
|
def sign_up_post(v):
|
||||||
with open('disable_signups', 'r') as f:
|
with open('disable_signups', 'r') as f:
|
||||||
if f.read() == "yes": return {"error": "New account registration is currently closed. Please come back later."}, 403
|
if f.read() == "yes": return {"error": "New account registration is currently closed. Please come back later."}, 403
|
||||||
|
@ -413,7 +413,7 @@ def get_reset():
|
||||||
|
|
||||||
@app.post("/reset")
|
@app.post("/reset")
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("1/second")
|
||||||
@auth_required
|
@auth_desired
|
||||||
def post_reset(v):
|
def post_reset(v):
|
||||||
if v: return redirect('/')
|
if v: return redirect('/')
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ def post_reset(v):
|
||||||
message="Login normally to access your account.")
|
message="Login normally to access your account.")
|
||||||
|
|
||||||
@app.get("/lost_2fa")
|
@app.get("/lost_2fa")
|
||||||
@auth_required
|
@auth_desired
|
||||||
def lost_2fa(v):
|
def lost_2fa(v):
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue