From 8caf2bddbc3763d024335ce83e4f03a6840aaa77 Mon Sep 17 00:00:00 2001 From: fram3d Date: Sat, 24 Oct 2026 04:14:33 +0200 Subject: [PATCH] fix import and checking ratelimit in routes --- luser/routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/luser/routes.py b/luser/routes.py index caaf56c..54e6ffc 100644 --- a/luser/routes.py +++ b/luser/routes.py @@ -1,6 +1,7 @@ from flask import render_template, request, redirect from luser import app from luser.models import LUSER +from luser.models import ratelimit from passlib.hash import ldap_salted_sha1,sha512_crypt import subprocess import random @@ -88,7 +89,7 @@ def unregister(): @app.route('/account/register/', methods=['POST', 'GET']) def register(): rl = ratelimit(PERIOD, LIMIT, "/var/luser/luser/.ratelimit") - if rl.check(1): + if rl.check(1) == False: return 'Error: rate limit exceeded, please come again in ' + PERIOD if request.method == 'GET': captcha_solution = str(random.randint(0,999999))