From fb40197320993c3184210af045df1a124bd31d41 Mon Sep 17 00:00:00 2001 From: nilsteampassnet Date: Sun, 9 Sep 2018 20:49:05 +0200 Subject: [PATCH] 2.1.27 Fix for #2408, #2326 --- changelog.txt | 1 + items.load.php | 10 +++++++--- load.php | 3 +-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index a753ca253..80d9faee4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,6 @@ 2.1.27 22/ + #2408 Password complexity not enforced #2326 link copy doesn't work corectly 21/ diff --git a/items.load.php b/items.load.php index 50b9d9910..fb0ed427e 100755 --- a/items.load.php +++ b/items.load.php @@ -979,6 +979,9 @@ function EditerItem() url = "https://"+url; } + // Get complexity respected? + var complexityIsOk = parseInt($("#edit_mypassword_complex").val()) >= parseInt($("#complexite_groupe").val()) ? true : false; + // do checks if ($('#edit_label').val() == "") erreur = ""; else if ($("#edit_pw1").val() === "" && $("#create_item_without_password").val() !== "1") erreur = ""; @@ -989,15 +992,16 @@ function EditerItem() //Check pw complexity level if (( $("#bloquer_modification_complexite").val() == 0 && - parseInt($("#edit_mypassword_complex").val()) >= parseInt($("#complexite_groupe").val()) + complexityIsOk === true ) || ($("#bloquer_modification_complexite").val() == 1) || ($('#recherche_group_pf').val() == 1 && $('#personal_sk_set').val() == 1) || - ($("#create_item_without_password").val() === "1" && $("#pw1").val !== "") - ) { + ($("#create_item_without_password").val() === "1" && $("#pw1").val !== "" && ($("#edit_pw1").val() === '' || complexityIsOk === true)) + ) { + LoadingPage(); //afficher image de chargement var annonce = 0; if ($('#edit_annonce').attr('checked')) annonce = 1; diff --git a/load.php b/load.php index 49dccacc4..d08e054cc 100644 --- a/load.php +++ b/load.php @@ -48,7 +48,7 @@ - + @@ -69,7 +69,6 @@ -