1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 22:35:57 +00:00

Consistently handle param string to bool conversions in handlers.

This commit is contained in:
wn_
2021-11-18 18:07:43 +00:00
parent d6f604c06c
commit 2422aae577
6 changed files with 31 additions and 33 deletions

View File

@@ -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']);