FIX #12041
This commit is contained in:
parent
23de8694fa
commit
7015e71105
@ -206,7 +206,7 @@ class modGeneratePassPerso extends ModeleGenPassword
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* consecutive iterations of the same character
|
* Consecutive iterations of the same character
|
||||||
*
|
*
|
||||||
* @param string $password Password to check
|
* @param string $password Password to check
|
||||||
* @return int 0 if KO, >0 if OK
|
* @return int 0 if KO, >0 if OK
|
||||||
@ -214,8 +214,12 @@ class modGeneratePassPerso extends ModeleGenPassword
|
|||||||
public function consecutiveInterationSameCharacter($password)
|
public function consecutiveInterationSameCharacter($password)
|
||||||
{
|
{
|
||||||
$last = "";
|
$last = "";
|
||||||
|
|
||||||
|
if (empty($this->NbRepeat)) return 1;
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$char = str_split($password);
|
$char = str_split($password);
|
||||||
|
|
||||||
foreach($char as $c) {
|
foreach($char as $c) {
|
||||||
if($c != $last) {
|
if($c != $last) {
|
||||||
$last = $c;
|
$last = $c;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user