News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Cant register with * in name

Started by pzyhô, May 02, 2011, 01:29:07 PM

Previous topic - Next topic

pzyhô

Well i know the "*" is the wildcard of the forum but is there a way to change the wildcard character to another for example "#" or something?

Cause some ppl want register with a * in the name :)


Thanks in advance

pzyhô
My Mods: click

CapadY

* is not just the wildcard of the forum, it's the wildcard of all searchoptions on the whole internet.
So, changing it isn't the most smart option.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

pzyhô

uhm ok but is there a way to allow register with * in name ?
My Mods: click

pzyhô

My Mods: click

IchBin™

Typically when you take input from user data into your database, you want to control what is allowed in their input to limit the attack vectors where people can try to hack your site. The "*" is universal character used in many different places. In particular worry here, mysql uses it as a wildcard when doing queries. Allowing such things is bad security IMO. While certainly one can defend against such things, typically you should try not to defend, but prevent.  As you can see by the comment in this code that checks for that character.

Code (find in Sources/Subs-Members.php) Select

// Characters we just shouldn't allow, regardless.
foreach (array('*') as $char)
if (strpos($checkName, $char) !== false)
if ($fatal)
fatal_lang_error('username_reserved', 'password', array($char));
else
return true;


Remove it if you dare, but we do not suggest it.
IchBin™        TinyPortal

pzyhô

uhm ok if it is a security risk i dont change it, thanks anyways
My Mods: click

Advertisement: