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