From ceed1d64595a160e91db37aed243c1c5b4854a9d Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Wed, 18 Apr 2018 20:07:36 +0200 Subject: [PATCH] Fix errors due to undefined variables Signed-off-by: Tobias Speicher --- libraries/common.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/common.inc.php b/libraries/common.inc.php index ff65c14384..1805466bbe 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -140,7 +140,7 @@ $GLOBALS['url_params'] = array(); */ $GLOBALS['goto'] = ''; // Security fix: disallow accessing serious server files via "?goto=" -if (Core::checkPageValidity($_REQUEST['goto'])) { +if (isset($_REQUEST['goto']) && Core::checkPageValidity($_REQUEST['goto'])) { $GLOBALS['goto'] = $_REQUEST['goto']; $GLOBALS['url_params']['goto'] = $_REQUEST['goto']; } else { @@ -151,7 +151,7 @@ if (Core::checkPageValidity($_REQUEST['goto'])) { * returning page * @global string $GLOBALS['back'] */ -if (Core::checkPageValidity($_REQUEST['back'])) { +if (isset($_REQUEST['back']) && Core::checkPageValidity($_REQUEST['back'])) { $GLOBALS['back'] = $_REQUEST['back']; } else { unset($_REQUEST['back'], $_GET['back'], $_POST['back'], $_COOKIE['back']); @@ -219,7 +219,7 @@ Core::setGlobalDbOrTable('table'); * Store currently selected recent table. * Affect $GLOBALS['db'] and $GLOBALS['table'] */ -if (Core::isValid($_REQUEST['selected_recent_table'])) { +if (isset($_REQUEST['selected_recent_table']) && Core::isValid($_REQUEST['selected_recent_table'])) { $recent_table = json_decode($_REQUEST['selected_recent_table'], true); $GLOBALS['db']