forked from rDrama/rDrama
login: don't allow logged in users to attempt to login
parent
fe9252d42f
commit
b59e4cadaa
|
@ -37,9 +37,10 @@ def login_deduct_when(resp):
|
||||||
return g.login_failed
|
return g.login_failed
|
||||||
|
|
||||||
@app.post("/login")
|
@app.post("/login")
|
||||||
|
@auth_desired
|
||||||
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
|
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
|
||||||
def login_post():
|
def login_post(v:Optional[User]):
|
||||||
template = ''
|
if v: abort(400)
|
||||||
g.login_failed = True
|
g.login_failed = True
|
||||||
|
|
||||||
username = request.values.get("username")
|
username = request.values.get("username")
|
||||||
|
|
Loading…
Reference in New Issue