mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-78647 files: safer unserializing of file reference data.
This commit is contained in:
parent
cfe33b82e3
commit
a11938293e
@ -1957,7 +1957,7 @@ class file_storage {
|
||||
if ($decoded === false) {
|
||||
throw new file_reference_exception(null, $str, null, null, 'Invalid base64 format');
|
||||
}
|
||||
$params = @unserialize($decoded); // hide E_NOTICE
|
||||
$params = unserialize_array($decoded);
|
||||
if ($params === false) {
|
||||
throw new file_reference_exception(null, $decoded, null, null, 'Not an unserializeable value');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user