mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 03:50:22 +02:00
Correctly check empty subjects/messages (Bug #17915)
Do not check usernames against word censor list. Disallowed usernames is already checked and word censor belong to posts. (Bug #17745) Additionally include non-postable forums for moderators forums shown within the teams list. (Bug #17265) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8306 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -137,6 +137,9 @@ function user_update_name($old_name, $new_name)
|
||||
{
|
||||
set_config('newest_username', $new_name, true);
|
||||
}
|
||||
|
||||
// Because some tables/caches use username-specific data we need to purge this here.
|
||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1472,20 +1475,6 @@ function validate_username($username, $allowed_username = false)
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT word
|
||||
FROM ' . WORDS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (preg_match('#(' . str_replace('\*', '.*?', preg_quote($row['word'], '#')) . ')#i', $username))
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return 'USERNAME_DISALLOWED';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user