1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

Some updates... username updates are now finished (no more changing here). Please review the changes to search.php (at the moment not active).

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4066 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-05-29 14:23:48 +00:00
parent 1e8b8e1601
commit efe6ed8753
5 changed files with 68 additions and 64 deletions

View File

@@ -81,7 +81,15 @@ function get_userdata($user, $force_str = false)
{
global $db;
$user = ((intval($user) == 0) || ($force_str)) ? str_replace("\'", "''", htmlspecialchars(trim($user))) : intval($user);
if (intval($user) == 0 || $force_str)
{
$user = trim(htmlspecialchars($user));
$user = substr(str_replace("\'", "'", $user), 0, 25);
}
else
{
$user = intval($user);
}
$sql = "SELECT *
FROM " . USERS_TABLE . "

View File

@@ -102,8 +102,8 @@ function validate_username($username)
}
$db->sql_freeresult($result);
// Don't allow " in username.
if (strstr($username, '"') || strstr($username, '"'))
// Don't allow " and ALT-255 in username.
if (strstr($username, '"') || strstr($username, '"') || strstr($username, chr(160)))
{
return array('error' => true, 'error_msg' => $lang['Username_invalid']);
}