BUG 5713 "Password Length ignoring parameter in db.php"
- misspelling problem, but is solved now
This commit is contained in:
@@ -124,11 +124,11 @@ class UsersProperties extends BaseUsersProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function validatePassword($sPassword, $sLastUpdate, $iChangePasswordNextTime) {
|
public function validatePassword($sPassword, $sLastUpdate, $iChangePasswordNextTime) {
|
||||||
if (!defined('PPP_MINIMUN_LENGTH')) {
|
if (!defined('PPP_MINIMUM_LENGTH')) {
|
||||||
define('PPP_MINIMUN_LENGTH', 5);
|
define('PPP_MINIMUM_LENGTH', 5);
|
||||||
}
|
}
|
||||||
if (!defined('PPP_MAXIMUN_LENGTH')) {
|
if (!defined('PPP_MAXIMUM_LENGTH')) {
|
||||||
define('PPP_MAXIMUN_LENGTH', 20);
|
define('PPP_MAXIMUM_LENGTH', 20);
|
||||||
}
|
}
|
||||||
if (!defined('PPP_NUMERICAL_CHARACTER_REQUIRED')) {
|
if (!defined('PPP_NUMERICAL_CHARACTER_REQUIRED')) {
|
||||||
define('PPP_NUMERICAL_CHARACTER_REQUIRED', 0);
|
define('PPP_NUMERICAL_CHARACTER_REQUIRED', 0);
|
||||||
@@ -152,11 +152,11 @@ class UsersProperties extends BaseUsersProperties {
|
|||||||
$iLength = strlen($sPassword);
|
$iLength = strlen($sPassword);
|
||||||
}
|
}
|
||||||
$aErrors = array();
|
$aErrors = array();
|
||||||
if ($iLength < PPP_MINIMUN_LENGTH) {
|
if ($iLength < PPP_MINIMUM_LENGTH) {
|
||||||
$aErrors[] = 'ID_PPP_MINIMUN_LENGTH';
|
$aErrors[] = 'ID_PPP_MINIMUM_LENGTH';
|
||||||
}
|
}
|
||||||
if ($iLength > PPP_MAXIMUN_LENGTH) {
|
if ($iLength > PPP_MAXIMUM_LENGTH) {
|
||||||
$aErrors[] = 'ID_PPP_MAXIMUN_LENGTH';
|
$aErrors[] = 'ID_PPP_MAXIMUM_LENGTH';
|
||||||
}
|
}
|
||||||
if (PPP_NUMERICAL_CHARACTER_REQUIRED == 1) {
|
if (PPP_NUMERICAL_CHARACTER_REQUIRED == 1) {
|
||||||
if (preg_match_all('/[0-9]/', $sPassword, $aMatch, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) == 0) {
|
if (preg_match_all('/[0-9]/', $sPassword, $aMatch, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) == 0) {
|
||||||
|
|||||||
@@ -225,13 +225,13 @@ try {
|
|||||||
$aFields['DESCRIPTION'] .= G::LoadTranslation('ID_POLICY_ALERT').':<br /><br />';
|
$aFields['DESCRIPTION'] .= G::LoadTranslation('ID_POLICY_ALERT').':<br /><br />';
|
||||||
foreach ($aErrors as $sError) {
|
foreach ($aErrors as $sError) {
|
||||||
switch ($sError) {
|
switch ($sError) {
|
||||||
case 'ID_PPP_MINIMUN_LENGTH':
|
case 'ID_PPP_MINIMUM_LENGTH':
|
||||||
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).': ' . PPP_MINIMUN_LENGTH . '<br />';
|
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).': ' . PPP_MINIMUM_LENGTH . '<br />';
|
||||||
$aFields[substr($sError, 3)] = PPP_MINIMUN_LENGTH;
|
$aFields[substr($sError, 3)] = PPP_MINIMUM_LENGTH;
|
||||||
break;
|
break;
|
||||||
case 'ID_PPP_MAXIMUN_LENGTH':
|
case 'ID_PPP_MAXIMUM_LENGTH':
|
||||||
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).': ' . PPP_MAXIMUN_LENGTH . '<br />';
|
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).': ' . PPP_MAXIMUM_LENGTH . '<br />';
|
||||||
$aFields[substr($sError, 3)] = PPP_MAXIMUN_LENGTH;
|
$aFields[substr($sError, 3)] = PPP_MAXIMUM_LENGTH;
|
||||||
break;
|
break;
|
||||||
case 'ID_PPP_EXPIRATION_IN':
|
case 'ID_PPP_EXPIRATION_IN':
|
||||||
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).' ' . PPP_EXPIRATION_IN . ' ' . G::LoadTranslation('ID_DAYS') . '<br />';
|
$aFields['DESCRIPTION'] .= ' - ' . G::LoadTranslation($sError).' ' . PPP_EXPIRATION_IN . ' ' . G::LoadTranslation('ID_DAYS') . '<br />';
|
||||||
|
|||||||
Reference in New Issue
Block a user