mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Merge branch 'master' into develop
This commit is contained in:
@@ -45,7 +45,7 @@ class iTopMutex
|
|||||||
static protected $aAcquiredLocks = array(); // Number of instances of the Mutex, having the lock, in this page
|
static protected $aAcquiredLocks = array(); // Number of instances of the Mutex, having the lock, in this page
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
$sName, $sDBHost = null, $sDBUser = null, $sDBPwd = null, $bDBTlsEnabled = false, $sDBTlsCA = null
|
$sName, $sDBHost = null, $sDBUser = null, $sDBPwd = null, $bDBTlsEnabled = null, $sDBTlsCA = null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Compute the name of a lock for mysql
|
// Compute the name of a lock for mysql
|
||||||
|
|||||||
@@ -261,7 +261,10 @@ class SimpleCryptMcryptEngine implements CryptEngine
|
|||||||
|
|
||||||
public function Encrypt($key, $sString)
|
public function Encrypt($key, $sString)
|
||||||
{
|
{
|
||||||
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($this->td), MCRYPT_RAND_URANDOM); // MCRYPT_RAND_URANDOM is now useable since itop requires php >= 5.6
|
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($this->td), MCRYPT_DEV_URANDOM); // MCRYPT_DEV_URANDOM is now useable since itop requires php >= 5.6
|
||||||
|
if (false === $iv) {
|
||||||
|
throw new Exception('IV generation failed');
|
||||||
|
}
|
||||||
mcrypt_generic_init($this->td, $key, $iv);
|
mcrypt_generic_init($this->td, $key, $iv);
|
||||||
if (empty($sString))
|
if (empty($sString))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user