From fc6da409f24abe6818ddeaaa75e949da369885f1 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Sat, 8 May 1999 05:07:21 +0000 Subject: Oops. Accounts created via the "createaccount.cgi" page were not getting their password emailed to them. --- CGI.pl | 63 ++++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 29 deletions(-) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index 062d02348..ce58c54d1 100644 --- a/CGI.pl +++ b/CGI.pl @@ -325,6 +325,39 @@ sub CheckEmailSyntax { +sub MailPassword { + my ($login, $password) = (@_); + my $urlbase = Param("urlbase"); + my $template = "From: bugzilla-daemon +To: %s +Subject: Your bugzilla password. + +To use the wonders of bugzilla, you can use the following: + + E-mail address: %s + Password: %s + + To change your password, go to: + ${urlbase}changepassword.cgi + + (Your bugzilla and CVS password, if any, are not currently synchronized. + Top hackers are working around the clock to fix this, as you read this.) +"; + my $msg = sprintf($template, $login, $login, $password); + + open SENDMAIL, "|/usr/lib/sendmail -t"; + print SENDMAIL $msg; + close SENDMAIL; + + print "Content-type: text/html\n\n"; + print "

Password has been emailed.

\n"; + print "The password for the e-mail address\n"; + print "$login has been e-mailed to that address.\n"; + print "

When the e-mail arrives, you can click Back\n"; + print "and enter your password in the form there.\n"; +} + + sub confirm_login { my ($nexturl) = (@_); @@ -350,35 +383,7 @@ sub confirm_login { SqlQuote($enteredlogin)); $realpwd = FetchOneColumn(); } - my $urlbase = Param("urlbase"); - my $template = "From: bugzilla-daemon -To: %s -Subject: Your bugzilla password. - -To use the wonders of bugzilla, you can use the following: - - E-mail address: %s - Password: %s - - To change your password, go to: - ${urlbase}changepassword.cgi - - (Your bugzilla and CVS password, if any, are not currently synchronized. - Top hackers are working around the clock to fix this, as you read this.) -"; - my $msg = sprintf($template, $enteredlogin, $enteredlogin, - $realpwd); - - open SENDMAIL, "|/usr/lib/sendmail -t"; - print SENDMAIL $msg; - close SENDMAIL; - - print "Content-type: text/html\n\n"; - print "

Password has been emailed.

\n"; - print "The password for the e-mail address\n"; - print "$enteredlogin has been e-mailed to that address.\n"; - print "

When the e-mail arrives, you can click Back\n"; - print "and enter your password in the form there.\n"; + MailPassword($enteredlogin, $realpwd); exit; } -- cgit v1.2.3-24-g4f1b