Changeset 23 for trunk/client
- Timestamp:
- Mar 5, 2010, 1:53:30 PM (15 years ago)
- Location:
- trunk/client
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/file.php
r15 r23 10 10 die("<center><img src=src=\"images/logo.gif\" target=\"Logo Avviso Errore\"><br><br><b>Ci sono dei problemi di connessione al DataBase $dbtype, chiediamo scusa per l'inconveniente.<br><br>Provate piu' tardi, Grazie.</b><br><font color=\"#ff0000\">". mysql_error()."</font></center>"); 11 11 } 12 mysql_ set_charset('utf8', $dbi);12 mysql_query("SET NAMES 'utf8'", $dbi); 13 13 if ($fase=='1'){ 14 14 $res = mysql_query("SELECT id_cons_gen,descrizione from ".$prefix."_ele_consultazione order by descrizione",$dbi); -
trunk/client/modules.php
r17 r23 35 35 36 36 foreach ($_GET as $sec_key => $secvalue) { 37 if ((preg_match( '/<[^>]*script*\"?[^>]*>/i',$secvalue)) ||38 ( eregi("<[^>]*object*\"?[^>]*>", $secvalue)) ||39 ( eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) ||40 ( eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) ||41 ( eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) ||42 ( eregi("<[^>]*style*\"?[^>]*>", $secvalue)) ||43 ( eregi("<[^>]*form*\"?[^>]*>", $secvalue)) ||44 ( eregi("<[^>]*img*\"?[^>]*>", $secvalue)) ||45 ( eregi("<[^>]*onmouseover*\"?[^>]*>", $secvalue)) ||46 ( eregi("<[^>]*body*\"?[^>]*>", $secvalue)) ||47 ( eregi("\([^>]*\"?[^)]*\)", $secvalue)) ||48 ( eregi("\"", $secvalue)) ||49 ( eregi("inside_mod", $sec_key))) {37 if ((preg_match("/<[^>]*script*\"?[^>]*>/i",$secvalue)) || 38 (preg_match("/<[^>]*object*\"?[^>]*>/i", $secvalue)) || 39 (preg_match("/<[^>]*iframe*\"?[^>]*>/i", $secvalue)) || 40 (preg_match("/<[^>]*applet*\"?[^>]*>/i", $secvalue)) || 41 (preg_match("/<[^>]*meta*\"?[^>]*>/i", $secvalue)) || 42 (preg_match("/<[^>]*style*\"?[^>]*>/i", $secvalue)) || 43 (preg_match("/<[^>]*form*\"?[^>]*>/i", $secvalue)) || 44 (preg_match("/<[^>]*img*\"?[^>]*>/i", $secvalue)) || 45 (preg_match("/<[^>]*onmouseover*\"?[^>]*>/i", $secvalue)) || 46 (preg_match("/<[^>]*body*\"?[^>]*>/i", $secvalue)) || 47 (preg_match("/\([^>]*\"?[^)]*\)/", $secvalue)) || 48 (preg_match("/\"/", $secvalue)) || 49 (preg_match("/inside_mod/i", $sec_key))) { 50 50 die ("Operazione non consentita"); 51 51 } … … 53 53 54 54 foreach ($_POST as $secvalue) { 55 if (( eregi("<[^>]*onmouseover*\"?[^>]*>", $secvalue)) || (eregi("<[^>]script*\"?[^>]*>", $secvalue)) || (eregi("<[^>]*body*\"?[^>]*>", $secvalue)) || (eregi("<[^>]style*\"?[^>]*>", $secvalue))) {55 if ((preg_match("/<[^>]*onmouseover*\"?[^>]*>/i", $secvalue)) || (preg_match("/<[^>]script*\"?[^>]*>/i", $secvalue)) || (preg_match("/<[^>]*body*\"?[^>]*>/i", $secvalue)) || (preg_match("/<[^>]style*\"?[^>]*>/i", $secvalue))) { 56 56 die ($htmltags); 57 57 } … … 74 74 global $op,$name; 75 75 if(!isset($_GET['js'])){ 76 $querystring= @ eregi_replace($_SERVER['DOCUMENT_ROOT'],'http://'.$_SERVER['HTTP_HOST'].'/',$_SERVER['SCRIPT_FILENAME']);77 if ( eregi("modules.php",$_SERVER['SCRIPT_NAME'])) $pagina="name=$name"; // reindirizza78 if ( eregi("admin.php",$_SERVER['SCRIPT_NAME'])) $pagina="op=$op"; // reindirizza76 $querystring= @preg_replace('/'.$_SERVER['DOCUMENT_ROOT'].'/i','http://'.$_SERVER['HTTP_HOST'].'/',$_SERVER['SCRIPT_FILENAME']); 77 if (preg_match("/modules.php/i",$_SERVER['SCRIPT_NAME'])) $pagina="name=$name"; // reindirizza 78 if (preg_match("/admin.php/i",$_SERVER['SCRIPT_NAME'])) $pagina="op=$op"; // reindirizza 79 79 echo "<noscript><meta http-equiv=\"refresh\" content=\"0; url=".$querystring."?js=b&$pagina\"/></noscript>"; 80 80 } … … 104 104 die("<center><img src=src=\"images/logo.gif\" target=\"Logo Avviso Errore\"><br/><br/><b>Ci sono dei problemi di connessione al DataBase $dbtype, chiediamo scusa per l'inconveniente.<br/><br/>Provate piu' tardi, Grazie.</b><br/><font color=\"#ff0000\">". mysql_error()."</font></center>"); 105 105 } 106 mysql_ set_charset('utf8', $dbi);106 mysql_query("SET NAMES 'utf8'", $dbi); 107 107 108 108 # carica i parametri di default sulla tabella … … 210 210 $tema=$param['tema']; 211 211 $tema=htmlentities($tema); // evita xss 212 if( eregi("%", $tema)) $tema="default";// evita xss212 if(preg_match("/%/i", $tema)) $tema="default";// evita xss 213 213 $_SESSION['newtema']="$tema"; 214 214 } 215 215 216 if ( eregi("%",$_SESSION['newtema'])) $_SESSION['newtema']="default"; // xss216 if (preg_match("/%/i",$_SESSION['newtema'])) $_SESSION['newtema']="default"; // xss 217 217 if (isset($_SESSION['newtema'])) $tema=$_SESSION['newtema']; 218 218
Note:
See TracChangeset
for help on using the changeset viewer.