From 605ce3388bd81c45903dd10947aa447b8ad8cffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 15 Dec 2015 10:24:03 +0100 Subject: [PATCH] Remove duplicate checking of goto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's already done in common.inc.php, no need to check again here (and the check was wrong anyway). Signed-off-by: Michal Čihař --- sql.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sql.php b/sql.php index a9b4a9979cd0..9d356afe280e 100644 --- a/sql.php +++ b/sql.php @@ -45,15 +45,8 @@ /** * Defines the url to return to in case of error in a sql statement */ -// Security checks -if (! empty($goto)) { - $is_gotofile = preg_replace('@^([^?]+).*$@s', '\\1', $goto); - if (! @file_exists('' . $is_gotofile)) { - unset($goto); - } else { - $is_gotofile = ($is_gotofile == $goto); - } -} else { +$is_gotofile = true; +if (empty($goto)) { if (empty($table)) { $goto = Util::getScriptNameForOption( $GLOBALS['cfg']['DefaultTabDatabase'], 'database' @@ -63,7 +56,6 @@ $GLOBALS['cfg']['DefaultTabTable'], 'table' ); } - $is_gotofile = true; } // end if if (! isset($err_url)) {