From: Roland Häder Date: Wed, 10 Aug 2016 07:47:09 +0000 (+0200) Subject: Some fixes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c649882fd9802ed34c60a99ac3b7cae767189690;p=ctracker.git Some fixes: - also check REQUEST_URI array element as QUERY_STRING may not be always set - only sanitize when string is not empty Signed-off-by: Roland Häder --- diff --git a/libs/lib_general.php b/libs/lib_general.php index f4b956e..1b2b886 100644 --- a/libs/lib_general.php +++ b/libs/lib_general.php @@ -191,12 +191,15 @@ function crackerTrackerQueryString ($sanitize = FALSE) { // Is it there? if (!empty($_SERVER['QUERY_STRING'])) { - // Return NULL + // Get string escaped $query = crackerTrackerEscapeString(urldecode($_SERVER['QUERY_STRING'])); - } // END - if + } elseif (!empty($_SERVER['REQUEST_URI'])) { + // Get string escaped + $query = crackerTrackerEscapeString(urldecode($_SERVER['REQUEST_URI'])); + } // Sanitize it? - if ($sanitize === TRUE) { + if ((!empty($query)) && ($sanitize === TRUE)) { // Sanitize ... $query = crackerTrackerSanitize($query); } // END - if