MDL-80174 tool_log: ensure "other" data is safely unserialized.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user