X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Fscripts%2Fpublic_html%2Fcommon.php;h=d56c9d40bf5b5d4b1eab1df4afb59737547c4048;hb=5c0ced5c13852bcc93761859285efe4c5f0d2513;hp=48121b5498ad748ff80ffff815bdd6fef0bfb483;hpb=a861a24c3dfcf3f9445b691b693e1ae890712b56;p=helm.git diff --git a/helm/software/matita/scripts/public_html/common.php b/helm/software/matita/scripts/public_html/common.php index 48121b549..d56c9d40b 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 = ltrim(rtrim(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);