From fc14e9189d9b26c383384e5bf62095fe114650db Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Fri, 17 Mar 2023 03:45:09 +0000 Subject: [PATCH] feat(authentication): check password policy during registration of new users --- powerdnsadmin/routes/index.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/powerdnsadmin/routes/index.py b/powerdnsadmin/routes/index.py index 79768c7..a21ad31 100644 --- a/powerdnsadmin/routes/index.py +++ b/powerdnsadmin/routes/index.py @@ -788,6 +788,10 @@ def register(): email=email ) + (password_policy_pass, password_policy) = password_policy_check(user, password) + if not password_policy_pass: + return render_template('register.html', error_messages=password_policy, captcha_enable=CAPTCHA_ENABLE) + try: result = user.create_local_user() if result and result['status']: