19a2c966fb63be8fa3a1e54a0ca7a6c3f79e573c
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) {
22)         return ereg_replace('["\'` \t\r\n]', '', $input );
23) }