Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.2.1 Username Bug
#1
Wewt. i found a bug....

When a user enters their username in registration:
meh_asdf would be accepted....

cPanel does not allow _ and likely other symbols in usernames... Im not sure what else is not allowed by cPanel.

cPanel does make the account however and truncates it without the symbol.
[Image: sig.png]
#2
Yeah, I noticed/forgot about that. :p
Kevin Mark - TheHostingTool Lead Developer
#3
Now all you got to do is add a little amount of code to strip those from the username and provide an error
#4
Duh. -----WORDS TO MAKE MY POST LONGER SO MYBB WILL ACCEPT IT...
[Image: sig.png]
#5
Find in includes/ajax.php:
Code:
        else {
            //If the first character is a number, then complain.
            if(is_numeric(substr($main->getvar['user'], 0, 1))) {
                echo 0;
                return;
            }
        }

Add below:
Code:
        if(!preg_match("/^([0-9a-zA-Z])+$/",$main->getvar['user'])) {
            echo 0;
            return;
        }
- KuJoe


Forum Jump:


Users browsing this thread: 1 Guest(s)