Fix /blackjack/ not verifying user.

remotes/1693045480750635534/spooky-22
Snakes 2022-08-11 03:50:07 -04:00
parent 249c593379
commit c15f07a186
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 6 additions and 2 deletions

View File

@ -923,11 +923,15 @@ def unsave_comment(cid, v):
return {"message": "Comment unsaved!"}
@app.post("/blackjack/<cid>")
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@limiter.limit("1/second;30/minute;200/hour;1000/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}')
@limiter.limit("1/second;30/minute;200/hour;2500/day")
@limiter.limit("1/second;30/minute;200/hour;2500/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}')
@auth_required
def handle_blackjack_action(cid, v):
comment = get_comment(cid)
if v.id != comment.author_id:
abort(403)
if 'active' in comment.blackjack_result:
try: action = request.values.get("thing").strip().lower()
except: abort(400)