Project

General

Profile

« Previous | Next » 

Revision 4864

Added by walbridge about 15 years ago

Provide improved contextUrl, provide proper URL in password reset message body

View differences:

src/perl/ldapweb.cgi
62 62

  
63 63
# url configuration
64 64
my $server = $properties->splitToTree(qr/\./, 'server');
65
my $contextUrl = 'http://' . $properties->getProperty('server.name') . ':' .
66
                 $properties->getProperty('server.httpPort') . '/' .
67
                 $properties->getProperty('application.context');
65
my $contextUrl = 'http://' . $properties->getProperty('server.name');
66
if ($properties->getProperty('server.httpPort') ne '80') {
67
        $contextUrl = $contextUrl . ':' . $properties->getProperty('server.httpPort');
68
}
69
$contextUrl = $contextUrl . '/' .  $properties->getProperty('application.context');
68 70

  
69 71
my $metacatUrl = $contextUrl . "/metacat";
70 72
my $cgiPrefix = "/" . $properties->getProperty('application.context') . "/cgi-bin";
......
630 632
        my $mailhost = $properties->getProperty('email.mailhost');
631 633
        my $sender =  $properties->getProperty('email.sender');
632 634
        # Send the email message to them
635
        debug("sending notification: $mailhost, $sender, $recipient");
633 636
        my $smtp = Net::SMTP->new($mailhost);
634 637
        $smtp->mail($sender);
635 638
        $smtp->to($recipient);
......
643 646
        This is generally done when somebody forgets their password.  Your 
644 647
        password can be changed by visiting the following URL:
645 648

  
646
        $cgiUrl?stage=changepass&cfg=$cfg
649
        $contextUrl/cgi-bin/ldapweb.cgi?stage=changepass&cfg=$cfg
647 650

  
648 651
            Username: $username
649 652
        Organization: $org

Also available in: Unified diff