From 0a2a17e3a4d180ff8a23ef4bd56a5d05f2a303aa Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 21 Mar 2006 13:58:58 +0000 Subject: [PATCH] go --- helm/software/matita/scripts/public_html/bench.php | 12 +++++++++++- helm/software/matita/scripts/public_html/common.php | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/helm/software/matita/scripts/public_html/bench.php b/helm/software/matita/scripts/public_html/bench.php index 0a3d4fde5..84f27d6e2 100644 --- a/helm/software/matita/scripts/public_html/bench.php +++ b/helm/software/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/helm/software/matita/scripts/public_html/common.php b/helm/software/matita/scripts/public_html/common.php index 48121b549..0e7962abf 100644 --- a/helm/software/matita/scripts/public_html/common.php +++ b/helm/software/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