hanno commited on 2007-08-09 19:13:23
Zeige 2 geänderte Dateien mit 7 Einfügungen und 4 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@607 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -44,10 +44,14 @@ function verify_input_general( $input ) |
| 44 | 44 |
} |
| 45 | 45 |
|
| 46 | 46 |
|
| 47 |
- |
|
| 48 | 47 |
function filter_input_username( $input ) |
| 49 | 48 |
{
|
| 50 |
- if (ereg_replace("[^[:alnum:]\_\.\+\-]", "", $input ) != $input)
|
|
| 49 |
+ return ereg_replace("[^[:alnum:]\_\.\+\-]", "", $input );
|
|
| 50 |
+} |
|
| 51 |
+ |
|
| 52 |
+function verify_input_username( $input ) |
|
| 53 |
+{
|
|
| 54 |
+ if (filter_input_username( $input ) != $input) |
|
| 51 | 55 |
system_failure("Ihre Daten enthielten ungültige Zeichen!");
|
| 52 | 56 |
} |
| 53 | 57 |
|
| ... | ... |
@@ -145,8 +145,7 @@ function check_valid($acc) |
| 145 | 145 |
return "Es wurde kein Domain-Teil im Account-Name angegeben. Account-Namen müssen einen Domain-Teil enthalten. Im Zweifel versuchen Sie »@schokokeks.org«."; |
| 146 | 146 |
|
| 147 | 147 |
list($local, $domain) = explode('@', $acc['account'], 2);
|
| 148 |
- if ($local != filter_input_username($local)) |
|
| 149 |
- return "Sie haben ungültige Zeichen im Accountname benutzt!"; |
|
| 148 |
+ verify_input_username($local); |
|
| 150 | 149 |
$tmpdomains = get_domain_list($user['customerno'], $user['uid']); |
| 151 | 150 |
$domains = array(); |
| 152 | 151 |
foreach ($tmpdomains as $dom) |
| 153 | 152 |