Refactor test system to be more extendable, add comment test

This commit is contained in:
Ben Rog-Wilhelm 2022-12-17 17:41:35 -08:00 committed by GitHub
parent 23a8fb9663
commit e257db1542
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 147 additions and 59 deletions

View file

@ -261,8 +261,9 @@ def sign_up_post(v):
return redirect(f"/signup?{urlencode(args)}")
if now - int(form_timestamp) < 5:
return signup_error("There was a problem. Please try again.")
if app.config['RATE_LIMITER_ENABLED']:
if now - int(form_timestamp) < 5:
return signup_error("There was a problem. Please try again.")
if not hmac.compare_digest(correct_formkey, form_formkey):
return signup_error("There was a problem. Please try again.")