forked from MarseyWorld/MarseyWorld
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
|
||||
|
||||
@app.post("/login")
|
||||
@auth_desired
|
||||
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
|
||||
def login_post():
|
||||
template = ''
|
||||
def login_post(v:Optional[User]):
|
||||
if v: abort(400)
|
||||
g.login_failed = True
|
||||
|
||||
username = request.values.get("username")
|
||||
|
|
Loading…
Reference in New Issue