Merged in bugfix/PMCORE-1996 (pull request #8379)
PMCORE-1996 Spaces as password is validate but the user can not login again Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -195,6 +195,10 @@ class UsersProperties extends BaseUsersProperties
|
||||
$changePassword = 1;
|
||||
}
|
||||
}
|
||||
//Spaces not supported at the end of passwords
|
||||
if (substr($password, -1) === " ") {
|
||||
$listErrors[] = 'ID_PPP_SPACES_NOT_SUPPORTED_AT_THE_END_OF_PASSWORD';
|
||||
}
|
||||
|
||||
if ($changePassword == 1) {
|
||||
$listErrors[] = 'ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN';
|
||||
|
||||
@@ -22277,6 +22277,12 @@ msgstr "Minimum length"
|
||||
msgid "Numerical Character is required"
|
||||
msgstr "Numerical Character is required"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PPP_SPACES_NOT_SUPPORTED_AT_THE_END_OF_PASSWORD
|
||||
#: LABEL/ID_PPP_SPACES_NOT_SUPPORTED_AT_THE_END_OF_PASSWORD
|
||||
msgid "Spaces not supported at the end of password"
|
||||
msgstr "Spaces not supported at the end of password"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PPP_SPECIAL_CHARACTER_REQUIRED
|
||||
#: LABEL/ID_PPP_SPECIAL_CHARACTER_REQUIRED
|
||||
|
||||
@@ -60625,6 +60625,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_PPP_MINIMUM_LENGTH','en','Minimum length','2014-01-15') ,
|
||||
( 'LABEL','ID_PPP_MINIMUN_LENGTH','en','Minimum length','2014-01-15') ,
|
||||
( 'LABEL','ID_PPP_NUMERICAL_CHARACTER_REQUIRED','en','Numerical Character is required','2014-01-15') ,
|
||||
( 'LABEL','ID_PPP_SPACES_NOT_SUPPORTED_AT_THE_END_OF_PASSWORD','en','Spaces not supported at the end of password','2022-02-09') ,
|
||||
( 'LABEL','ID_PPP_SPECIAL_CHARACTER_REQUIRED','en','Special Character is required','2014-01-15') ,
|
||||
( 'LABEL','ID_PPP_UPPERCASE_CHARACTER_REQUIRED','en','Uppercase Character is required','2014-01-15') ,
|
||||
( 'LABEL','ID_PREFERENCES','en','Preferences','2014-01-15') ,
|
||||
|
||||
@@ -40,7 +40,8 @@ try {
|
||||
|
||||
if (isset($frm['USR_USERNAME'])) {
|
||||
$usr = mb_strtolower(trim($frm['USR_USERNAME']), 'UTF-8');
|
||||
$pwd = trim($frm['USR_PASSWORD']);
|
||||
//Spaces not supported at the end of passwords
|
||||
$pwd = rtrim($frm['USR_PASSWORD']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
@@ -108,6 +108,11 @@ var verifyPassword = function() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//Spaces not supported at the end of passwords
|
||||
if (oPassword1.value.slice(-1) === ' ') {
|
||||
alert('@G::LoadTranslation(ID_PPP_SPACES_NOT_SUPPORTED_AT_THE_END_OF_PASSWORD)');
|
||||
return;
|
||||
}
|
||||
oPassword1.form.submit();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user