MyBB Community Forums

Full Version: [F] The User with no name [R] [C-Michael83]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I believe we do trim() and check for blank spaces in usernames and disallow them - This user is probably using a hidden character. We've gone over this before that we can't block every single hidden character in the world without causing other problems.
I confirmed the bug. Just press the space button three times... =)
(2008-09-12, 08:14 PM)destroyer Wrote: [ -> ]I confirmed the bug. Just press the space button three times... =)

I am unable to reproduce on my localhost. We do indeed trim spaces btw. Here was my debug code on inc/datahandler/user.php

// Fix bad characters
		$username = trim($username);
		var_dump($username);
		$username = str_replace(array(unicode_chr(160), unicode_chr(173), unicode_chr(0xCA), dec_to_utf8(8238), dec_to_utf8(8237)), array(" ", "-", "", "", ""), $username);
		var_dump($username);

		// Remove multiple spaces from the username
		$username = preg_replace("#\s{2,}#", " ", $username);
		var_dump($username);

output of " " being: string(0) "" string(0) "" string(0) "" with an error message of: "You did not enter a username. Please enter one."
On mine it passes the Ajax validation, but not when you submit it.
OK, I indeed need to rewrite my post... it only passes the ajax validation.

So it's a little bug then? Toungue
(2008-09-13, 11:09 AM)destroyer Wrote: [ -> ]OK, I indeed need to rewrite my post... it only passes the ajax validation.

So it's a little bug then? Toungue

The original poster stated that a user did register with a blank name - however, unless otherwise stated, I think we can assume that was because of hidden characters and there really isn't much we can do about it.

But yes, we can confirm the ajax validation doesn't take into account spaces
if the user hadn't been renamed it would of been easy to find out what character he used.

I'll see if i can replicate it

the only other thing i can think of is if it's a chinese/japanese etc character and you dont have an apropriate language pack installed to view the character and your browser is rendering it as a space and it's somehow messing up mybb for the "no-one" part
Another note on the problem; The language string "No-One" only exists in portal.lang.php so there is no way that it showed up as "No-One" in the member list unless that was actually his username.
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
I've marked this bug as fixed only to represent the bug report for the Javascript Validation not taking into account spaces.
Pages: 1 2