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

This commit is contained in:
Stevani Andolo
2023-12-06 03:53:17 +01:00
committed by Jenkins
parent 7bd8adfd89
commit fdacc779e7
+1 -1
View File
@@ -82,7 +82,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);
}