From: jakubvrana Date: Wed, 26 Aug 2009 11:23:31 +0000 (+0000) Subject: \r can be part of a query X-Git-Tag: v3.0.0~511 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=e75ef01c2cee100d77e2bb0fc0ac12f8cf8ff685;p=adminer.git \r can be part of a query git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1017 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 2fe94edd..d0d94039 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -9,8 +9,7 @@ page_header(lang('SQL command'), $error); if (!$error && $_POST) { $query = ($_POST["webfile"] ? @file_get_contents("adminer.sql") : ($_POST["file"] ? get_file("sql_file") : $_POST["query"])); - if (is_string($query)) { // get_file() returns error as number - $query = str_replace("\r", "", $query); // parser looks for \n + if (is_string($query)) { // get_file() returns error as number, file_get_contents as false $query = rtrim($query); if (strlen($query) && (!$history || end($history) != $query)) { // don't add repeated $history[] = $query;