2005-09-10 19:25:43 +02:00
|
|
|
|
<?php
|
|
|
|
|
//soll dein funktion entahlten die alle <20>bergebenen parameter <20>berpr<70>ft
|
|
|
|
|
//'`'"
|
|
|
|
|
|
|
|
|
|
foreach ($_GET as $k => $v)
|
|
|
|
|
{
|
|
|
|
|
$v = htmlspecialchars($v);
|
|
|
|
|
$v = mysql_escape_string($v);
|
|
|
|
|
// $v = htmlentities($v);
|
|
|
|
|
if (preg_match('/([\"`])/', $v, $match))
|
|
|
|
|
{
|
|
|
|
|
print "sorry get has illegal char '$match[1]'";
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2005-10-21 20:50:26 +02:00
|
|
|
|
$_GET[$k] = $v;
|
2005-09-10 19:25:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($_POST as $k => $v)
|
|
|
|
|
{
|
|
|
|
|
$v = htmlspecialchars($v);
|
|
|
|
|
$v = mysql_escape_string($v);
|
|
|
|
|
// $v = htmlentities($v);
|
|
|
|
|
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-09-10 19:25:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|