BUG-15561 Cambiar el algoritmo o metodo de cifrado... SOLVED
- It don't have the functionality. - A function was add in class bootstrap hasPassword. - a function was add in class enterprise.
This commit is contained in:
@@ -2868,7 +2868,6 @@ class Bootstrap
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
error_log('hasPassword bootstrap ' . $passEncrypt);
|
|
||||||
|
|
||||||
return $passEncrypt;
|
return $passEncrypt;
|
||||||
}
|
}
|
||||||
@@ -2876,11 +2875,9 @@ class Bootstrap
|
|||||||
public function verifyHashPassword ($pass, $userPass)
|
public function verifyHashPassword ($pass, $userPass)
|
||||||
{
|
{
|
||||||
//$verify = Bootstrap::hasPassword($pass);
|
//$verify = Bootstrap::hasPassword($pass);
|
||||||
error_log('contraseña config...');
|
|
||||||
if (Bootstrap::hasPassword($pass) == $userPass) {
|
if (Bootstrap::hasPassword($pass) == $userPass) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
error_log('contraseña anterior...');
|
|
||||||
if (Bootstrap::hasPassword($pass, true) == $userPass) {
|
if (Bootstrap::hasPassword($pass, true) == $userPass) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ class RbacUsers extends BaseRbacUsers
|
|||||||
$aFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
$aFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
//verify password with md5, and md5 format
|
//verify password with md5, and md5 format
|
||||||
if (mb_strtoupper($sUsername, 'utf-8') === mb_strtoupper($aFields['USR_USERNAME'], 'utf-8')) {
|
if (mb_strtoupper($sUsername, 'utf-8') === mb_strtoupper($aFields['USR_USERNAME'], 'utf-8')) {
|
||||||
error_log('contraseña bbdd... '. $aFields['USR_PASSWORD']);
|
|
||||||
if( Bootstrap::verifyHashPassword($sPassword, $aFields['USR_PASSWORD']) ) {
|
if( Bootstrap::verifyHashPassword($sPassword, $aFields['USR_PASSWORD']) ) {
|
||||||
if ($aFields['USR_DUE_DATE'] < date('Y-m-d')) {
|
if ($aFields['USR_DUE_DATE'] < date('Y-m-d')) {
|
||||||
return -4;
|
return -4;
|
||||||
|
|||||||
@@ -351,16 +351,13 @@ class enterprisePlugin extends PMPlugin
|
|||||||
G::LoadClass( "configuration" );
|
G::LoadClass( "configuration" );
|
||||||
$config= new Configurations();
|
$config= new Configurations();
|
||||||
$typeEncrypt = $config->getConfiguration('ENTERPRISE_SETTING_ENCRYPT', '');
|
$typeEncrypt = $config->getConfiguration('ENTERPRISE_SETTING_ENCRYPT', '');
|
||||||
//$typeEncrypt = ($typeEncrypt == null) ? 'md5' : isset($typeEncrypt['current']) ? $typeEncrypt['current'] : 'md5';
|
|
||||||
$encrypt = 'md5';
|
$encrypt = 'md5';
|
||||||
if ($typeEncrypt != null) {
|
if ($typeEncrypt != null) {
|
||||||
if (isset($typeEncrypt['current']) && $typeEncrypt['current'] != '') {
|
if (isset($typeEncrypt['current']) && $typeEncrypt['current'] != '') {
|
||||||
$encrypt = $typeEncrypt['current'];
|
$encrypt = $typeEncrypt['current'];
|
||||||
error_log('hashPassword bootstrap ' . $encrypt);
|
|
||||||
}
|
}
|
||||||
if ($previous && isset($typeEncrypt['previous']) && $typeEncrypt['previous'] != '' ) {
|
if ($previous && isset($typeEncrypt['previous']) && $typeEncrypt['previous'] != '' ) {
|
||||||
$encrypt = $typeEncrypt['previous'];
|
$encrypt = $typeEncrypt['previous'];
|
||||||
error_log('hashPassword bootstrap ' . $encrypt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eval("\$var = hash('" . $encrypt . "', '" . $pass . "');");
|
eval("\$var = hash('" . $encrypt . "', '" . $pass . "');");
|
||||||
|
|||||||
Reference in New Issue
Block a user