1

Topic: Usernames starting with 'digit + whitespace' are "banned"

I noticed that users with usernames starting with 'digit + whitespace' (e.g. 1 Joe) are reported as Banned. Despite that, this message proves that "banned" user can still post new topics and messages.

Sorry, if due to limited knowledge of the product i reported "feature" not a bug smile


Vytautas Mieliauskas

Re: Usernames starting with 'digit + whitespace' are "banned"

Wow, that's weird. I'll have a look at it tonight :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Usernames starting with 'digit + whitespace' are "banned"

Here's a quickfix. Open up include/functions.php and go to line 331. There, replace:

else if (in_array(strtolower($user['username']), $ban_list))

with

else if (in_array(strtolower($user['username']), $ban_list, true))

Oh, btw. The bug only affects usernames starting with the digit 1 :D

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4 (edited by Jansson 2004-03-01 19:26)

Re: Usernames starting with 'digit + whitespace' are "banned"

What?! Rickard: I can't believe you didn't notice that problem before.. You suck at bug tracking.. roll wink

5

Re: Usernames starting with 'digit + whitespace' are "banned"

Yeah, names starting with 1 are the first thing a weathered bugtracker tests.

6

Re: Usernames starting with 'digit + whitespace' are "banned"

Rickard wrote:

Here's a quickfix. Open up include/functions.php and go to line 331. There, replace:

else if (in_array(strtolower($user['username']), $ban_list))

with

else if (in_array(strtolower($user['username']), $ban_list, true))

Oh, btw. The bug only affects usernames starting with the digit 1 :D

Thanks for a fix, and sorry for misleading report :)

Re: Usernames starting with 'digit + whitespace' are "banned"

1 Joe wrote:

Thanks for a fix, and sorry for misleading report :)

There's no need to be sorry. Most people would have said something along the lines of: "WHY THE HELL AM I BANNED YOU LAMER?!!!!" :D

"Programming is like sex: one mistake and you have to support it for the rest of your life."