PMCORE-4059 Password Policy is not working

This commit is contained in:
Roly Gutierrez
2022-11-10 12:47:28 -04:00
parent 4b0cbf9a75
commit b2a42356ce
6 changed files with 9 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ return [
'url' => env('APP_URL', 'http://localhost'), 'url' => env('APP_URL', 'http://localhost'),
'env' => env('APP_ENV', 'production'), 'env' => env('APP_ENV', 'production'),
'debug' => env('APP_DEBUG', false), 'debug' => env('APP_DEBUG', false),
'cache_lifetime' => env('APP_CACHE_LIFETIME', 60), 'cache_lifetime' => env('APP_CACHE_LIFETIME', 3600), //laravel 8.x the time parameter is in seconds.
'key' => env('APP_KEY', 'base64:rU28h/tElUn/eiLY0qC24jJq1rakvAFRoRl1DWxj/kM='), 'key' => env('APP_KEY', 'base64:rU28h/tElUn/eiLY0qC24jJq1rakvAFRoRl1DWxj/kM='),
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
'timezone' => 'UTC', 'timezone' => 'UTC',

View File

@@ -608,7 +608,7 @@ class LdapAdvanced
if (empty($message)) { if (empty($message)) {
$message = G::LoadTranslation('ID_LDAP_ERROR_CONNECTION'); $message = G::LoadTranslation('ID_LDAP_ERROR_CONNECTION');
} }
Cache::put('ldapMessageError', $message, 2); Cache::put('ldapMessageError', $message, 120); //laravel 8.x the time parameter is in seconds.
$this->log($linkIdentifier, $messageError); $this->log($linkIdentifier, $messageError);
} }
@@ -1588,7 +1588,7 @@ class LdapAdvanced
if ($error = ldap_errno($ldapcnn)) { if ($error = ldap_errno($ldapcnn)) {
$messageError = ldap_err2str($error); $messageError = ldap_err2str($error);
Cache::put('ldapMessageError', $messageError, 2); Cache::put('ldapMessageError', $messageError, 120); //laravel 8.x the time parameter is in seconds.
// //
} else { } else {
if ($searchResult) { if ($searchResult) {

View File

@@ -20,7 +20,7 @@ try {
$googleClient = $gmailOAuth->getGoogleClient(); $googleClient = $gmailOAuth->getGoogleClient();
$result = $googleClient->authenticate($_GET['code']); $result = $googleClient->authenticate($_GET['code']);
if (isset($result["error"])) { if (isset($result["error"])) {
Cache::put('errorMessageIfNotAuthenticate', G::json_decode($result["error"]), 2); Cache::put('errorMessageIfNotAuthenticate', G::json_decode($result["error"]), 120); //laravel 8.x the time parameter is in seconds.
G::header($header); G::header($header);
return; return;
} }
@@ -34,7 +34,7 @@ try {
* value in minutes for each session. We use 2 minutes, enough time to retrieve * value in minutes for each session. We use 2 minutes, enough time to retrieve
* the error message if there is one. * the error message if there is one.
*/ */
Cache::put('errorMessageIfNotAuthenticate', $e->getMessage(), 2); Cache::put('errorMessageIfNotAuthenticate', $e->getMessage(), 120); //laravel 8.x the time parameter is in seconds.
} }
G::header($header); G::header($header);

View File

@@ -34,7 +34,7 @@ try {
* value in minutes for each session. We use 2 minutes, enough time to retrieve * value in minutes for each session. We use 2 minutes, enough time to retrieve
* the error message if there is one. * the error message if there is one.
*/ */
Cache::put('errorMessageIfNotAuthenticate', $e->getMessage(), 2); Cache::put('errorMessageIfNotAuthenticate', $e->getMessage(), 120); //laravel 8.x the time parameter is in seconds.
} }
G::header($header); G::header($header);

View File

@@ -52,7 +52,7 @@ try {
$enterprise->setup(); $enterprise->setup();
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
Cache::put('ldapMessageError', '', 2); Cache::put('ldapMessageError', '', 120); //laravel 8.x the time parameter is in seconds.
$uid = $RBAC->VerifyLogin($usr, $pwd); $uid = $RBAC->VerifyLogin($usr, $pwd);
$ldapMessageError = Cache::pull('ldapMessageError'); $ldapMessageError = Cache::pull('ldapMessageError');
$RBAC->cleanSessionFiles(72); //cleaning session files older than 72 hours $RBAC->cleanSessionFiles(72); //cleaning session files older than 72 hours
@@ -404,7 +404,7 @@ try {
"browserTimeZoneOffset" => $_POST['form']['BROWSER_TIME_ZONE_OFFSET'] "browserTimeZoneOffset" => $_POST['form']['BROWSER_TIME_ZONE_OFFSET']
]; ];
$messPassword['__USR_PASSWORD_CHANGE__'] = G::generateUniqueID(); $messPassword['__USR_PASSWORD_CHANGE__'] = G::generateUniqueID();
Cache::put($messPassword['__USR_PASSWORD_CHANGE__'], $values, 2); Cache::put($messPassword['__USR_PASSWORD_CHANGE__'], $values, 120); //laravel 8.x the time parameter is in seconds.
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePasswordpm3', '', $messPassword, 'sysLoginVerify'); $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/changePasswordpm3', '', $messPassword, 'sysLoginVerify');
G::RenderPage('publish'); G::RenderPage('publish');
session_destroy(); session_destroy();

View File

@@ -7,7 +7,7 @@
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
{$header} {$header}
</head> </head>
{if ($user_logged neq '' or $tracker neq '') and $timezone_status neq 'failed'} {if ((isset($user_logged) && $user_logged neq '') or (isset($tracker) && $tracker neq '')) and $timezone_status neq 'failed'}
<body> <body>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" id="pm_main_table"> <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" id="pm_main_table">
<tr> <tr>