mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°4058 - Setup failed when added an encrypted field due to default value NULL non SODIUM compatible (#754)
* N°4058 - Setup failed when added an encrypted field due to default value NULL non SODIUM compatible * N°4058 - Setup failed when added an encrypted field due to default value NULL non SODIUM compatible * change log level to warning
This commit is contained in:
@@ -130,7 +130,15 @@ class SimpleCrypt
|
||||
*/
|
||||
function Decrypt($key, $string)
|
||||
{
|
||||
return $this->oEngine->Decrypt($key,$string);
|
||||
try{
|
||||
return $this->oEngine->Decrypt($key,$string);
|
||||
} catch(\Exception $e){
|
||||
if (strlen($string)==0){
|
||||
IssueLog::Warning("Cannot decrypt empty/null value", null, ['msg' => $e->getMessage(), 'stack' => $e->getTraceAsString()]);
|
||||
return $string;
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -422,4 +430,4 @@ class SimpleCryptOpenSSLMcryptCompatibilityEngine implements CryptEngine
|
||||
return trim($plaintext);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user