Seite 2 von 2

Verfasst: 09.10.2004 13:53
von Christian_N
Acid es kommt leider zu fehlermeldungen bei ein paar zeichen wie `´~
Parse error: parse error, unexpected '~' in /usr/export/www/vhosts/funnetwork/hosting/suessemaus28884/phpBB-Board2/includes/functions_validate.php on line 109
Wenn ich die zeichen alle rausnehm die diese fehlermeldung verursache kann man die am ende nur wieder bei die Registierung mit eingeben, gibt es noch ein ander weg wie es zu kein fehlermeldung kommen wird?

EDIT: So sieht es bei mir jetzt aus:
// Don't allow " and ALT-255 in username.
if (strstr($username, '"') || strstr($username, '"') || strstr($username, chr(160)) || strstr($username, '@') || strstr($username, ';') || strstr($username, '&') || strstr($username, '€') || strstr($username, ' ')
|| strstr($username, '°') || strstr($username, '^') || strstr($username, '!') || strstr($username, '²') || strstr($username, '³') || strstr($username, '§') || strstr($username, '$') || strstr($username, '%') || strstr($username, '{') || strstr($username, '/')
|| strstr($username, '[') || strstr($username, '(') || strstr($username, ']') || strstr($username, ')') || strstr($username, '=') || strstr($username, '}') || strstr($username, '?') || strstr($username, '\') || strstr($username, '*') || strstr($username, '+')
|| strstr($username, '~') || strstr($username, '#') || strstr($username, '>') || strstr($username, '<') || strstr($username, '|') || strstr($username, 'µ') || strstr($username, ',')
|| strstr($username, '.') || strstr($username, ':') || strstr($username, '´') || strstr($username, '`') || strstr($username, '''))
{
return array('error' => true, 'error_msg' => $lang['Username_invalid']);
}

return array('error' => false, 'error_msg' => '');
}

Verfasst: 09.10.2004 15:21
von Christian_N
Jetzt hab ich es soweit hinbekommen eigentlich aber wenn ich das zeichen \ also
|| strstr($username, '\')
so eingebe kommt diese Meldung "Parse error: parse error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/suessemaus28884/phpBB-Board2/includes/functions_validate.php on line 109"

Was kann man dagegen noch tun?

EDIT: Mir fällt auf das dass ' -Zeichen auch noch nicht dabei ist, kann ja schlecht
|| strstr($username, ''')
machen damit des ' Zeichen geblock wird, das gibt dann jedenfalls ne fehlermeldung, was kann ich also bei die 2 Zeichen ' und \ machen?

Verfasst: 09.10.2004 20:58
von Acid
|| strstr($username, '\\') || || strstr($username, '\'')

Verfasst: 09.10.2004 21:14
von Christian_N
Danke das hat prima geklappt, jetzt kann ich in der Registierung und lang_main in den sprache schreibe das keine "Sonderzeichen und Leerzeichen" erlaubt wird :)

Also Danke nochmal.

M.f.G SuesseMaus28884