space in username

Report bugs of current version 2.2.5 here!

Moderators: Moderator Team, Development Team

space in username

Postby BHiker on Sat Jan 03, 2004 6:46 pm

When a new user signs up using
pphlogger/dspSignup.php
and the username contains a space,
the space is replaced by a _ in the database

The next time the user logs in, he cannot use a space, an _ in his name works fine.

The subscription mail contains the right information, but no warning.

It would be better to javascript validate the input to prevent this confusing situation.
BHiker
 
Posts: 13
Joined: Sat Jan 03, 2004 3:52 pm
Location: Belgium

Postby sdjl on Sat Jan 03, 2004 8:32 pm

ah yes, i can re-create this error.

When someone signs up with a space, everything, to them, is reflected as being successful.
However in the admin section, their username shows with an _ instead of the space.

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby V@no on Sat Jan 03, 2004 10:20 pm

I dont know if its gonna work, but try this:
in login.php find
Code: Select all
if (!isset($password)) $password = $pw;
add after:
Code: Select all
$username = str_replace(" ", "_", $username);
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby sdjl on Sun Jan 04, 2004 8:29 pm

That would be a temporary fix for the login page only really.
You'd have to modify some code so that the pphlogger.js file had the correct username in as well.

You could add a check to the dspsignup.php script to tell users that they cant use spaces.

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby V@no on Sun Jan 04, 2004 8:59 pm

yes your are right...this should be done by not letting spaces in the frist place ;) also, on some servers none-english letters can cause problems with database, does pphlogger has limit on "alowed" caracters?
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby sdjl on Sun Jan 04, 2004 11:44 pm

I don't believe there's any restrictions set, no.

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK


Return to PPhlogger bug reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron