summaryrefslogtreecommitdiff
path: root/www-ssl/inc/secure.php
blob: 786c18a6e45b8ea0e7c22cb4e009ad0e539c867c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
//soll dein funktion entahlten die alle �bergebenen parameter �berpr�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;
	}
	$_GET[$k] = $v;
	echo "GET $k=\"$v\"<br>";
}
  
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;
	}
	$_POST[$k] = $v;
	echo "POST $k=\"$v\"<br>";
}

?>