diff --git a/pinc/filter_project_list.inc b/pinc/filter_project_list.inc index 8dbd40fee..8251e7591 100644 --- a/pinc/filter_project_list.inc +++ b/pinc/filter_project_list.inc @@ -416,7 +416,8 @@ function save_raw_data(string $pguser, string $data_name, string $data): void /** @return array */ function get_saved_data(string $pguser, string $filter_type): array { - $data = unserialize(get_raw_saved_data($pguser, "{$filter_type}_data")); + $raw = get_raw_saved_data($pguser, "{$filter_type}_data"); + $data = unserialize($raw, options: ['allowed_classes' => false]); // The raw data "", which we get if there's no saved data for this // user/filter PHP deserializes as false. We need an array. return $data !== false ? $data : []; diff --git a/tasks.php b/tasks.php index 250b73658..efdc1688b 100644 --- a/tasks.php +++ b/tasks.php @@ -1051,7 +1051,8 @@ function encode_array(array $a): string */ function decode_array(string $str): array { - $a = unserialize(base64_decode($str)); + $raw = base64_decode($str); + $a = unserialize($raw, options: ['allowed_classes' => false]); if (is_array($a)) { return $a; }