Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pinc/filter_project_list.inc
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ function save_raw_data(string $pguser, string $data_name, string $data): void
/** @return array<string, mixed> */
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 : [];
Expand Down
3 changes: 2 additions & 1 deletion tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down