Skip to content

Commit

Permalink
MDL-78647 files: safer unserializing of file reference data.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden authored and Jenkins committed Aug 9, 2023
1 parent 90346de commit b786630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filestorage/file_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ public static function unpack_reference($str, $cleanparams = false) {
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');
}
Expand Down

0 comments on commit b786630

Please sign in to comment.