• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Usernames not showing the letter "V" in them?

#1
I've disabled addons in the config.php so I can't see it being an addon issue.

A user just made an account with the letter "V" in and it just replaced it with a space so "glove" would be "glo e" for example.

Any help would be greatly appreciate, "V" is not in the named letters from usernames btw.
 

Mike

XenForo developer
Staff member
#6
Do you think you could submit a ticket via the customer area with FTP and ACP details?

It looks like your PCRE doesn't have \v (vertical white space). This is the first time I've seen this though.
 

Mike

XenForo developer
Staff member
#9
This is related to a 5+ years old PCRE install. You should probably contact your host about it. In general, it's preferable for PHP to be compiled with the built-in PCRE library (rather than the server version).
 

Mike

XenForo developer
Staff member
#11
The fix is to replace this code in library/XenForo/DataWriter/User.php:
Code:
$newName = preg_replace('/\v+/u', ' ', $username);
if (is_string($newName))
{
        $username = $newName;
}
With:
Code:
// if this matches, then \v isn't known (appears to be PCRE < 7.2) so don't strip
if (!preg_match('/\v/', 'v'))
{
        $newName = preg_replace('/\v+/u', ' ', $username);
        if (is_string($newName))
        {
                $username = $newName;
        }
}