2005-09-10 19:25:43 +02:00
|
|
|
|
<?php
|
|
|
|
|
//soll dein funktion entahlten die alle <20>bergebenen parameter <20>berpr<70>ft
|
|
|
|
|
//'`'"
|
2005-11-06 01:44:48 +01:00
|
|
|
|
|
2005-11-06 19:06:42 +01:00
|
|
|
|
if( $DEBUG)
|
|
|
|
|
echo "secure.php START<br>\n";
|
|
|
|
|
|
2005-09-10 19:25:43 +02:00
|
|
|
|
foreach ($_GET as $k => $v)
|
|
|
|
|
{
|
2005-11-21 00:57:20 +01:00
|
|
|
|
// $v = htmlspecialchars($v, ENT_QUOTES);
|
|
|
|
|
// $v = mysql_escape_string($v);
|
|
|
|
|
$v = htmlentities($v, ENT_QUOTES);
|
2005-11-09 17:05:28 +01:00
|
|
|
|
if (preg_match('/([\'"`\'])/', $v, $match))
|
2005-09-10 19:25:43 +02:00
|
|
|
|
{
|
|
|
|
|
print "sorry get has illegal char '$match[1]'";
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2005-10-21 20:50:26 +02:00
|
|
|
|
$_GET[$k] = $v;
|
2005-11-06 19:06:42 +01:00
|
|
|
|
|
|
|
|
|
if( $DEBUG)
|
|
|
|
|
echo "GET $k=\"$v\"<br>";
|
2005-09-10 19:25:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($_POST as $k => $v)
|
|
|
|
|
{
|
2005-11-21 00:57:20 +01:00
|
|
|
|
// $v = htmlspecialchars($v, ENT_QUOTES);
|
|
|
|
|
// $v = mysql_escape_string($v);
|
|
|
|
|
$v = htmlentities($v, ENT_QUOTES);
|
2005-09-10 19:25:43 +02:00
|
|
|
|
if (preg_match('/([\'"`\'])/', $v, $match)) {
|
|
|
|
|
print "sorry post has illegal char '$match[1]'";
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2005-10-21 20:50:26 +02:00
|
|
|
|
$_POST[$k] = $v;
|
2005-11-06 19:06:42 +01:00
|
|
|
|
|
|
|
|
|
if( $DEBUG)
|
|
|
|
|
echo "POST $k=\"$v\"<br>";
|
2005-09-10 19:25:43 +02:00
|
|
|
|
}
|
2005-11-06 19:06:42 +01:00
|
|
|
|
if( $DEBUG)
|
|
|
|
|
echo "secure.php END<br>\n";
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
?>
|