mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 07:35:29 +02:00
Cleaned usernames contain only single spaces, so 'a_name' and 'a__name' are treated as the same name [Bug #15634]
git-svn-id: file:///svn/phpbb/trunk@8261 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2ae1f1c3a8
commit
e129450b40
@ -53,6 +53,7 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li><a href="#changelog">Changelog</a>
|
<li><a href="#changelog">Changelog</a>
|
||||||
<ol style="list-style-type: lower-roman;">
|
<ol style="list-style-type: lower-roman;">
|
||||||
|
<li><a href="#v30rc8">Changes since RC-8</a></li>
|
||||||
<li><a href="#v30rc7">Changes since RC-7</a></li>
|
<li><a href="#v30rc7">Changes since RC-7</a></li>
|
||||||
<li><a href="#v30rc6">Changes since RC-6</a></li>
|
<li><a href="#v30rc6">Changes since RC-6</a></li>
|
||||||
<li><a href="#v30rc5">Changes since RC-5</a></li>
|
<li><a href="#v30rc5">Changes since RC-5</a></li>
|
||||||
@ -79,7 +80,13 @@
|
|||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
<a name="v30rc7"></a><h3>1.i. Changes since 3.0.RC7</h3>
|
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<a name="v30rc7"></a><h3>1.ii. Changes since 3.0.RC7</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||||
@ -114,7 +121,7 @@
|
|||||||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v30rc6"></a><h3>1.ii. Changes since 3.0.RC6</h3>
|
<a name="v30rc6"></a><h3>1.iii. Changes since 3.0.RC6</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||||
@ -124,7 +131,7 @@
|
|||||||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v30rc5"></a><h3>1.iii. Changes since 3.0.RC5</h3>
|
<a name="v30rc5"></a><h3>1.iv. Changes since 3.0.RC5</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
||||||
@ -187,7 +194,7 @@
|
|||||||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v30rc4"></a><h3>1.iv. Changes since 3.0.RC4</h3>
|
<a name="v30rc4"></a><h3>1.v. Changes since 3.0.RC4</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||||
@ -238,7 +245,7 @@
|
|||||||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v30rc3"></a><h3>1.v. Changes since 3.0.RC3</h3>
|
<a name="v30rc3"></a><h3>1.vi. Changes since 3.0.RC3</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||||
@ -347,7 +354,7 @@
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v30rc2"></a><h3>1.vi. Changes since 3.0.RC2</h3>
|
<a name="v30rc2"></a><h3>1.vii. Changes since 3.0.RC2</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||||
@ -393,7 +400,7 @@
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v30rc1"></a><h3>1.vii. Changes since 3.0.RC1</h3>
|
<a name="v30rc1"></a><h3>1.viii. Changes since 3.0.RC1</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||||
|
@ -1829,6 +1829,9 @@ function utf8_clean_string($text)
|
|||||||
// Other control characters
|
// Other control characters
|
||||||
$text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
|
$text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
|
||||||
|
|
||||||
|
// we need to reduce multiple spaces to a single one
|
||||||
|
$text = preg_replace('# {2,}#', ' ', $text);
|
||||||
|
|
||||||
// we can use trim here as all the other space characters should have been turned
|
// we can use trim here as all the other space characters should have been turned
|
||||||
// into normal ASCII spaces by now
|
// into normal ASCII spaces by now
|
||||||
return trim($text);
|
return trim($text);
|
||||||
|
@ -571,7 +571,7 @@ else
|
|||||||
|
|
||||||
// Checks/Operations that have to be completed prior to starting the update itself
|
// Checks/Operations that have to be completed prior to starting the update itself
|
||||||
$exit = false;
|
$exit = false;
|
||||||
if (version_compare($current_version, '3.0.RC4', '<='))
|
if (version_compare($current_version, '3.0.RC8', '<='))
|
||||||
{
|
{
|
||||||
// Define missing language entries...
|
// Define missing language entries...
|
||||||
if (!isset($lang['CLEANING_USERNAMES']))
|
if (!isset($lang['CLEANING_USERNAMES']))
|
||||||
@ -715,9 +715,13 @@ if (version_compare($current_version, '3.0.RC4', '<='))
|
|||||||
// duplicates might be created. Since the column has to be unique such usernames
|
// duplicates might be created. Since the column has to be unique such usernames
|
||||||
// must not exist. We need identify them and let the admin decide what to do
|
// must not exist. We need identify them and let the admin decide what to do
|
||||||
// about them.
|
// about them.
|
||||||
|
// After RC8 this was changed again, but this time only usernames containing spaces
|
||||||
|
// are affected.
|
||||||
|
$sql_where = (version_compare($current_version, '3.0.RC4', '<=')) ? '' : "WHERE username_clean LIKE '% %'";
|
||||||
$sql = 'SELECT user_id, username, username_clean
|
$sql = 'SELECT user_id, username, username_clean
|
||||||
FROM ' . USERS_TABLE . '
|
FROM ' . USERS_TABLE . "
|
||||||
ORDER BY user_id ASC';
|
$sql_where
|
||||||
|
ORDER BY user_id ASC";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$colliding_users = $found_names = array();
|
$colliding_users = $found_names = array();
|
||||||
@ -2765,6 +2769,8 @@ function utf8_new_clean_string($text)
|
|||||||
// Other control characters
|
// Other control characters
|
||||||
$text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
|
$text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
|
||||||
|
|
||||||
|
$text = preg_replace('# {2,}#', ' ', $text);
|
||||||
|
|
||||||
// we can use trim here as all the other space characters should have been turned
|
// we can use trim here as all the other space characters should have been turned
|
||||||
// into normal ASCII spaces by now
|
// into normal ASCII spaces by now
|
||||||
return trim($text);
|
return trim($text);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user