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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 07:49 Go to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 09:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 11:49 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 15:09 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 04:24 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 08:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 12:02 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 12:27 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 05:25 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
[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 06:01 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 06:44 Go to previous messageGo to next message
trepstrer is currently offline  trepstrer   Czech Republic
Messages: 9
Registered: November 2009
Karma: 2
Junior Member
add to buddy list
ignore all messages by this user
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 06:58 Go to previous messageGo to next message
GRninja is currently offline  GRninja
Messages: 6
Registered: November 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 09:12 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 18:27 Go to previous message
alexf2000 is currently offline  alexf2000   Ukraine
Messages: 3
Registered: December 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user

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

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

Current Time: Thu Oct 19 10:48:16 EDT 2017

Total time taken to generate the page: 0.00919 seconds