Fix for bug 93388: Full name should be trimmed of whitespace before going

into database.

r1=Zach Lipton <zach@zachlipton.com> r2=Andreas Franke
<afranke@ags.uni-sb.de>. Patch by Christopher Aillon
<caillon@returnzero.com>.
This commit is contained in:
zach%zachlipton.com 2001-09-23 17:20:50 +00:00
parent 4914db56bd
commit b1ef6bb6e8
2 changed files with 4 additions and 3 deletions

View File

@ -21,6 +21,7 @@
# Contributor(s): Terry Weissman <terry@mozilla.org>
# David Gardiner <david.gardiner@unisa.edu.au>
# Joe Robins <jmrobins@tgix.com>
# Christopher Aillon <christopher@aillon.com>
use diagnostics;
use strict;
@ -53,7 +54,7 @@ if(Param('useLDAP')) {
}
my $login = $::FORM{'login'};
my $realname = $::FORM{'realname'};
my $realname = trim($::FORM{'realname'});
if (defined $login) {
CheckEmailSyntax($login);
if (DBname_to_id($login) != 0) {

View File

@ -17,7 +17,7 @@
# Dan Mosedale <dmose@mozilla.org>
# Alan Raetz <al_raetz@yahoo.com>
# David Miller <justdave@syndicomm.com>
#
# Christopher Aillon <christopher@aillon.com>
use diagnostics;
use strict;
@ -171,7 +171,7 @@ sub SaveAccount {
WHERE userid = $userid");
}
SendSQL("UPDATE profiles SET " .
"realname = " . SqlQuote($::FORM{'realname'}) .
"realname = " . SqlQuote(trim($::FORM{'realname'})) .
" WHERE userid = $userid");
}