diff options
author | wn_ <[email protected]> | 2021-11-18 18:07:43 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2021-11-18 18:09:47 +0000 |
commit | 2422aae57711fafcedde6b381a0624ca67fa79cb (patch) | |
tree | 0ead75a58890f6e44920ba0725eaf065751995c6 /classes/rpc.php | |
parent | d6f604c06c2533a7c32d7a3accf4f4b8a47ad992 (diff) |
Consistently handle param string to bool conversions in handlers.
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-x | classes/rpc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/rpc.php b/classes/rpc.php index 75d008b8b..584b86b23 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -173,7 +173,7 @@ class RPC extends Handler_Protected { } function sanityCheck(): void { - $_SESSION["hasSandbox"] = clean($_REQUEST["hasSandbox"]) === "true"; + $_SESSION["hasSandbox"] = self::_param_to_bool($_REQUEST["hasSandbox"] ?? null); $_SESSION["clientTzOffset"] = clean($_REQUEST["clientTzOffset"]); $client_location = $_REQUEST["clientLocation"]; @@ -225,7 +225,7 @@ class RPC extends Handler_Protected { function catchupFeed(): void { $feed_id = clean($_REQUEST['feed_id']); - $is_cat = clean($_REQUEST['is_cat']) == "true"; + $is_cat = self::_param_to_bool($_REQUEST['is_cat'] ?? null); $mode = clean($_REQUEST['mode'] ?? ''); $search_query = clean($_REQUEST['search_query']); $search_lang = clean($_REQUEST['search_lang']); |