From fd304e9920881a9b0f7b4304be16bdb9892195cc Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 21 Mar 2006 13:58:58 +0000 Subject: [PATCH] go --- matita/scripts/public_html/bench.php | 12 +++++++++++- matita/scripts/public_html/common.php | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/matita/scripts/public_html/bench.php b/matita/scripts/public_html/bench.php index 0a3d4fde5..84f27d6e2 100644 --- a/matita/scripts/public_html/bench.php +++ b/matita/scripts/public_html/bench.php @@ -173,7 +173,17 @@ function links_of($name,$q,$limits){ SQL (only one query, ';' if present must terminate the query, no characters allowed after it): - + diff --git a/matita/scripts/public_html/common.php b/matita/scripts/public_html/common.php index 48121b549..0e7962abf 100644 --- a/matita/scripts/public_html/common.php +++ b/matita/scripts/public_html/common.php @@ -50,8 +50,9 @@ function printer($q){ function query($q,$f) { $db = mysql_pconnect("localhost","helm"); mysql_select_db("matita"); + $q = preg_replace("/\n/"," ",$q); if (!preg_match("/^(select|describe)[^\n;]*;?$/i",$q)) { - echo "Query not allowed!"; + die("Query not allowed!
" . $q . "
"); return; } $rc = mysql_query($q,$db); -- 2.39.2