MDL-80174 tool_log: ensure "other" data is safely unserialized.

This commit is contained in:
Stevani Andolo
2023-12-06 04:00:22 +01:00
committed by Jenkins
parent 7ace11d396
commit fcebf9b8a6
+1 -1
View File
@@ -75,7 +75,7 @@ trait reader {
*/
public static function decode_other(?string $other) {
if ($other === 'N;' || preg_match('~^.:~', $other ?? '')) {
return unserialize($other);
return unserialize($other, ['allowed_classes' => [stdClass::class]]);
} else {
return json_decode($other ?? '', true);
}