FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » bug when registering a new user (letters being removed from username)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
bug when registering a new user [message #161162] Fri, 20 November 2009 12:49 Go to next message
GRninja is currently offline  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 #161163 is a reply to message #161162] Fri, 20 November 2009 14:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Is this FUDforum version 3.0.0 that you've downloaded from SourceForge.net?
Re: bug when registering a new user [message #161207 is a reply to message #161162] Tue, 24 November 2009 16:49 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
yes it is the latest downloading from sourceforge
Re: bug when registering a new user [message #161210 is a reply to message #161207] Tue, 24 November 2009 20:09 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Please post detailed instructions on how you've installed; and how we can reproduce the problem. Alternatively, mail me login details to your server so I can debug the script.
Re: bug when registering a new user [message #161218 is a reply to message #161162] Wed, 25 November 2009 09:24 Go to previous messageGo to next message
GRninja is currently offline  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 #161220 is a reply to message #161218] Wed, 25 November 2009 13:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I fully understand. Problem is that unless I can simulate the problem, or get access to an environment with the problem, my hands are tied.

Good luck sorting it out.
Re: bug when registering a new user [message #161227 is a reply to message #161220] Wed, 25 November 2009 17:02 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
can you not give me the commands you would like to run and I will provide you with the output data
Re: bug when registering a new user [message #161228 is a reply to message #161227] Wed, 25 November 2009 17:27 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Please start by editing the PHP code. You need to add a bunch of echo statements to it to pinpoint the statement that causes the problem. It's a common debugging technique, so you should have no problem getting it done of finding help on the Net.
Re: bug when registering a new user [message #161233 is a reply to message #161162] Thu, 26 November 2009 10:25 Go to previous messageGo to next message
GRninja is currently offline  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 #161234 is a reply to message #161233] Thu, 26 November 2009 11:01 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
No, I cannot reproduce it. It's probably something weird in your setup.

The notice is meaningless - that file is generated and your line 2742 will be different on my system.
Re: bug when registering a new user [message #161238 is a reply to message #161233] Thu, 26 November 2009 11:44 Go to previous messageGo to next message
trepstrer is currently offline  trepstrer   Czech Republic
Messages: 9
Registered: November 2009
Karma: 2
Junior Member
GRninja wrote on Thu, 26 November 2009 11:25

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 have the same problem. Clean install on CentOS 5.4, characters "s","f" and "c" are removed from login name.

I've tracked down the problem to following line in register.php.t

$login = preg_replace( '/[\p{Cc}\p{Cf}\p{Cs}]/u', ' ', $login);


It seems it's related to Unicode support in PHP. However I have unicode support enabled.

I've commented that line as a workaround.
Re: bug when registering a new user [message #161239 is a reply to message #161238] Thu, 26 November 2009 11:58 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
Thank you .....

I am really appreciative this was driving me insane
Re: bug when registering a new user [message #161241 is a reply to message #161239] Thu, 26 November 2009 14:12 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
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)
Re: bug when registering a new user [message #161326 is a reply to message #161241] Mon, 07 December 2009 23:27 Go to previous message
alexf2000 is currently offline  alexf2000   Ukraine
Messages: 3
Registered: December 2009
Karma: 0
Junior Member

I've also had this problem on Centos. Fixing prm helps, thanks for info!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Accidental moderator
Next Topic: forest green template set
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Apr 19 19:48:24 GMT 2024

Total time taken to generate the page: 0.03547 seconds