From 0a31f4d1f3ef4396b7fcd7ef518298ddc7ee88f1 Mon Sep 17 00:00:00 2001 From: kkmanos Date: Tue, 14 Dec 2021 17:08:46 +0200 Subject: [PATCH] final testing --- powerdnsadmin/routes/index.py | 6 +++--- .../templates/admin_setting_authentication.html | 8 +++----- powerdnsadmin/templates/password_policy_macro.html | 9 ++++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/powerdnsadmin/routes/index.py b/powerdnsadmin/routes/index.py index bf98703..07d2625 100644 --- a/powerdnsadmin/routes/index.py +++ b/powerdnsadmin/routes/index.py @@ -7,7 +7,7 @@ import ipaddress from distutils.util import strtobool from yaml import Loader, load from onelogin.saml2.utils import OneLogin_Saml2_Utils -from flask import Blueprint, render_template, make_response, url_for, current_app, g, session, request, redirect, abort, jsonify +from flask import Blueprint, render_template, render_template, make_response, url_for, current_app, g, session, request, redirect, abort, jsonify from flask_login import login_user, logout_user, login_required, current_user from zxcvbn import zxcvbn @@ -708,8 +708,8 @@ def rate_password(): }), 200) result = zxcvbn(password, user_inputs=inputs) - defined_guesses_log = 11 - # attrubutes to return as json + defined_guesses_log = int(Setting().get('zxcvbn_guesses_log')) + # attributes to return as json feedback = [] rate = result['guesses_log10']/defined_guesses_log if rate < 0.5: diff --git a/powerdnsadmin/templates/admin_setting_authentication.html b/powerdnsadmin/templates/admin_setting_authentication.html index 4a2b492..578cf27 100644 --- a/powerdnsadmin/templates/admin_setting_authentication.html +++ b/powerdnsadmin/templates/admin_setting_authentication.html @@ -106,10 +106,8 @@ {% if SETTING.get('zxcvbn_enabled')== true %}disabled{% endif %}>
-
@@ -759,11 +757,11 @@