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:
Marco Antonio Nina
2014-09-22 10:26:13 -04:00
parent 48d963a033
commit 9de2f3262b
3 changed files with 0 additions and 7 deletions

View File

@@ -2868,7 +2868,6 @@ class Bootstrap
} catch (Exception $e) {
}
error_log('hasPassword bootstrap ' . $passEncrypt);
return $passEncrypt;
}
@@ -2876,11 +2875,9 @@ class Bootstrap
public function verifyHashPassword ($pass, $userPass)
{
//$verify = Bootstrap::hasPassword($pass);
error_log('contraseña config...');
if (Bootstrap::hasPassword($pass) == $userPass) {
return true;
}
error_log('contraseña anterior...');
if (Bootstrap::hasPassword($pass, true) == $userPass) {
return true;
}

View File

@@ -81,7 +81,6 @@ class RbacUsers extends BaseRbacUsers
$aFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
//verify password with md5, and md5 format
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 ($aFields['USR_DUE_DATE'] < date('Y-m-d')) {
return -4;

View File

@@ -351,16 +351,13 @@ class enterprisePlugin extends PMPlugin
G::LoadClass( "configuration" );
$config= new Configurations();
$typeEncrypt = $config->getConfiguration('ENTERPRISE_SETTING_ENCRYPT', '');
//$typeEncrypt = ($typeEncrypt == null) ? 'md5' : isset($typeEncrypt['current']) ? $typeEncrypt['current'] : 'md5';
$encrypt = 'md5';
if ($typeEncrypt != null) {
if (isset($typeEncrypt['current']) && $typeEncrypt['current'] != '') {
$encrypt = $typeEncrypt['current'];
error_log('hashPassword bootstrap ' . $encrypt);
}
if ($previous && isset($typeEncrypt['previous']) && $typeEncrypt['previous'] != '' ) {
$encrypt = $typeEncrypt['previous'];
error_log('hashPassword bootstrap ' . $encrypt);
}
}
eval("\$var = hash('" . $encrypt . "', '" . $pass . "');");