bug when registering a new user [message #161162] |
Fri, 20 November 2009 12:49 |
GRninja
Messages: 6 Registered: November 2009
Karma: 0
|
Junior Member |
|
|
Hi
I have installed the very latest version with a brand new install of the latest apache mysql on centos
when a user registers if they have the letters c or s in there name they are removed
can someone please advise... I am not a php coder but I have an ok knowledge of how it works so please be gentle with how technical yo go into it.
|
|
|
|
|
|
Re: bug when registering a new user [message #161218 is a reply to message #161162] |
Wed, 25 November 2009 09:24 |
GRninja
Messages: 6 Registered: November 2009
Karma: 0
|
Junior Member |
|
|
Ok I said I wasn't completely technical with .php
I didn't say I didn't understand....
the install was from source forge.net/projects/fud forum/files/
the brand new web install you designed it so should know the install process..
Sorry but I cannot give you the server login details I run too many live sites on the server...
what bug report would you like to see , I am happy to run any commands and post the reports
|
|
|
|
|
|
Re: bug when registering a new user [message #161233 is a reply to message #161162] |
Thu, 26 November 2009 10:25 |
GRninja
Messages: 6 Registered: November 2009
Karma: 0
|
Junior Member |
|
|
[Thu Nov 26 05:12:25 2009] [error] [client (IP)] PHP Notice: Trying to get property of non-object in /var/www/html/testbed/theme/default/register.php on line 2742, referer: h-t-t-p:// (myforum)/index.php?t=register&S=6d9188797427e7f2b392f04ad9dd0710&r eg_coppa=0
I was getting this, does this help you fine to problem...
I did another fresh install and the same problem happened again when registering a username with c or s in it the c and s are removed....
I am really sorry I cannot give you a login to the server..
surely you must be able to recreate this....
|
|
|
|
|
|
Re: bug when registering a new user [message #161241 is a reply to message #161239] |
Thu, 26 November 2009 14:12 |
|
naudefj
Messages: 3775 Registered: December 2004
Karma: 28
|
Senior Member Administrator Core Developer |
|
|
This may help to fix-up your systems - http://gaarai.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre /
Alternatively, please help to test this patch:
Index: register.php.t
===================================================================
--- register.php.t (revision 4868)
+++ register.php.t (working copy)
@@ -55,14 +55,21 @@
function sanitize_login($login)
{
- // Remove control, formatting, and surrogate characters.
- $login = preg_replace( '/[\p{Cc}\p{Cf}\p{Cs}]/u', ' ', $login);
+ if (@preg_match('/\pL/u', 'a') == 1) {
+ // Remove unicode control, formatting, and surrogate characters.
+ $login = preg_replace( '/[\p{Cc}\p{Cf}\p{Cs}]/u', '?', $login);
+ } else {
+ // PCRE unicode support is disabled, only keep word and whitespace characters.
+ $login = preg_replace( '/[^\w\s]/', '?', $login);
+ }
- // Other "bad" characters to remove.
- $badchars = '&';
+ // Bad characters to remove from login names.
+ $badchars = '&;';
+
+ // Control characters are also bad.
for ($i = 0; $i < 32; $i++) $badchars .= chr($i);
- return strtr($login, $badchars, str_repeat(' ', strlen($badchars)));
+ return strtr($login, $badchars, str_repeat('?', strlen($badchars)));
}
function register_form_check($user_id)
|
|
|
|