0f3889d9e62803ef4704f9376a4c576227681d3b
bernd input-filtering

bernd authored 16 years ago

1) <?php
2) 
3) 
4) function filter_input_general( $input )
5) {
6)         return htmlspecialchars(iconv('UTF-8', 'UTF-8', $input), ENT_QUOTES, 'UTF-8');
7) }
8) 
9) 
10) function filter_input_username( $input )
11) {
12)         return ereg_replace("[^[:alnum:]\_\.\+\-]", "", $input );
13) }
14) 
bernd Im Passwort dürfen auch kei...

bernd authored 16 years ago

15) function filter_quotes( $input )
16) {
17)         return ereg_replace('["\'`]', '', $input );
18) }
19) 
bernd Diverse shell-kritische zei...

bernd authored 16 years ago

20) function filter_shell( $input )
21) {
bernd shell-escaping braucht whit...

bernd authored 16 years ago

22)         return ereg_replace('[^-[:alnum:]\_\.\+ßäöüÄÖÜ/%§=]', '', $input );
bernd Diverse shell-kritische zei...

bernd authored 16 years ago

23) }