From ef5afae9ef7289847b53f9e4791e6e6dfd5d6039 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Sat, 27 Mar 1999 10:28:51 +0000 Subject: Added stuff to make it more obvious how to create an account. --- CGI.pl | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index 74d383646..fa3acb93e 100644 --- a/CGI.pl +++ b/CGI.pl @@ -260,6 +260,25 @@ sub quietly_check_login() { +sub CheckEmailSyntax { + my ($addr) = (@_); + if ($addr !~ /^[^@, ]*@[^@, ]*\.[^@, ]*$/) { + print "Content-type: text/html\n\n"; + + print "

Invalid e-mail address entered.

\n"; + print "The e-mail address you entered\n"; + print "($addr) didn't match our minimal\n"; + print "syntax checking for a legal email address. A legal\n"; + print "address must contain exactly one '\@', and at least one\n"; + print "'.' after the \@, and may not contain any commas or.\n"; + print "spaces.\n"; + print "

Please click back and try again.\n"; + exit; + } +} + + + sub confirm_login { my ($nexturl) = (@_); @@ -272,19 +291,8 @@ sub confirm_login { my $enteredlogin = $::FORM{"Bugzilla_login"}; my $enteredpwd = $::FORM{"Bugzilla_password"}; - if ($enteredlogin !~ /^[^@, ]*@[^@, ]*\.[^@, ]*$/) { - print "Content-type: text/html\n\n"; + CheckEmailSyntax($enteredlogin); - print "

Invalid e-mail address entered.

\n"; - print "The e-mail address you entered\n"; - print "($enteredlogin) didn't match our minimal\n"; - print "syntax checking for a legal email address. A legal\n"; - print "address must contain exactly one '\@', and at least one\n"; - print "'.' after the \@, and may not contain any commas or.\n"; - print "spaces.\n"; - print "

Please click back and try again.\n"; - exit; - } my $realcryptpwd = PasswordForLogin($::FORM{"Bugzilla_login"}); if (defined $::FORM{"PleaseMailAPassword"}) { -- cgit v1.2.3-24-g4f1b