mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
N°9379 - PHP unserialze function - security hardening
- code review
This commit is contained in:
@@ -3256,14 +3256,14 @@ TXT
|
|||||||
/**
|
/**
|
||||||
* PHP unserialize encapsulation, allow throwing exception when not allowed object class is detected (for security hardening)
|
* PHP unserialize encapsulation, allow throwing exception when not allowed object class is detected (for security hardening)
|
||||||
*
|
*
|
||||||
* @param mixed $data data to unserialize
|
* @param string $data data to unserialize
|
||||||
* @param array $aOptions PHP @unserialise options
|
* @param array $aOptions PHP @unserialise options
|
||||||
* @param bool $bThrowNotAllowedObjectClassException flag to throw exception
|
* @param bool $bThrowNotAllowedObjectClassException flag to throw exception
|
||||||
*
|
*
|
||||||
* @return mixed PHP @unserialise return
|
* @return mixed PHP @unserialise return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function Unserialize(mixed $data, array $aOptions = ['allowed_classes' => false], bool $bThrowNotAllowedObjectClassException = true): mixed
|
public static function Unserialize(string $data, array $aOptions = ['allowed_classes' => false], bool $bThrowNotAllowedObjectClassException = true): mixed
|
||||||
{
|
{
|
||||||
$data = unserialize($data, $aOptions);
|
$data = unserialize($data, $aOptions);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user