From cad844da937ca3b3ef3976ec33200e77481bdeaf Mon Sep 17 00:00:00 2001 From: "zach%zachlipton.com" <> Date: Mon, 24 Sep 2001 00:20:50 +0000 Subject: Fix for bug 93388: Full name should be trimmed of whitespace before going into database. r1=Zach Lipton r2=Andreas Franke . Patch by Christopher Aillon . --- createaccount.cgi | 3 ++- userprefs.cgi | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/createaccount.cgi b/createaccount.cgi index 5b9bfb9f6..3bf7f51b4 100755 --- a/createaccount.cgi +++ b/createaccount.cgi @@ -21,6 +21,7 @@ # Contributor(s): Terry Weissman # David Gardiner # Joe Robins +# Christopher Aillon 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) { diff --git a/userprefs.cgi b/userprefs.cgi index 0eeda0e71..4e73ec3a9 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -17,7 +17,7 @@ # Dan Mosedale # Alan Raetz # David Miller -# +# Christopher Aillon 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"); } -- cgit v1.2.3-24-g4f1b