BUG 15836 "Error al validar las politicas de..." SOLVED

- Error al validar las politicas de seguridad
- Problema resuelto, se valida al usuario cuando falla al loguearse, si se tiene a un mismo usuario y falla en tres
  veces previa configuracion, el usuario se inactiva tal como se hacíanteriormente, si un usuario falla al loguearse
  en dos ocaciones y en su tercer intento se loguea con otro usuario distinto este usuario no se inactivara.

  Disponible para la version 2.8 de ProcessMaker.
This commit is contained in:
Luis Fernando Saisa Lopez
2014-09-19 10:45:24 -04:00
parent e2ee4c493e
commit 0a4aece494
2 changed files with 13 additions and 0 deletions

View File

@@ -92,7 +92,14 @@ try {
$errLabel = 'WRONG_LOGIN_CREDENTIALS';
}
$_SESSION["USERNAME_PREVIOUS1"] = $_SESSION["USERNAME_PREVIOUS2"];
$_SESSION["USERNAME_PREVIOUS2"] = $usr;
if (!isset($uid) || $uid < 0) {
if ($_SESSION["USERNAME_PREVIOUS1"] != "" && $_SESSION["USERNAME_PREVIOUS2"] != "" && $_SESSION["USERNAME_PREVIOUS1"] != $_SESSION["USERNAME_PREVIOUS2"]) {
$_SESSION["FAILED_LOGINS"] = 0;
}
if (isset($_SESSION['FAILED_LOGINS']) && ($uid == -1 || $uid == -2)) {
$_SESSION['FAILED_LOGINS']++;
}

View File

@@ -44,9 +44,13 @@ $msgType = $_SESSION['G_MESSAGE_TYPE'];
if (!isset($_SESSION['FAILED_LOGINS'])) {
$_SESSION['FAILED_LOGINS'] = 0;
$_SESSION["USERNAME_PREVIOUS1"] = "";
$_SESSION["USERNAME_PREVIOUS2"] = "";
}
$sFailedLogins = $_SESSION['FAILED_LOGINS'];
$usernamePrevious1 = $_SESSION["USERNAME_PREVIOUS1"];
$usernamePrevious2 = $_SESSION["USERNAME_PREVIOUS2"];
$aFields['LOGIN_VERIFY_MSG'] = G::loadTranslation('LOGIN_VERIFY_MSG');
//$aFields['LOGIN_VERIFY_MSG'] = Bootstrap::loadTranslation('LOGIN_VERIFY_MSG');
@@ -120,6 +124,8 @@ if (strlen($msgType) > 0) {
}
$_SESSION['FAILED_LOGINS'] = $sFailedLogins;
$_SESSION["USERNAME_PREVIOUS1"] = $usernamePrevious1;
$_SESSION["USERNAME_PREVIOUS2"] = $usernamePrevious2;
//translation
//$Translations = G::getModel("Translation");