Project

General

Profile

« Previous | Next » 

Revision 4774

Added by daigle almost 16 years ago

Changing the ChangePassword method to fix password reset broke the password change functionality. Moved the fix (add dc to username) into the handleResetPassword function.

View differences:

src/perl/ldapweb.cgi
419 419
        my $o = $query->param('o');
420 420
        
421 421
        $searchBase = $ldapConfig->{$o}{'base'};
422
        $ldapUsername = $ldapConfig->{$o}{'user'};
422
        $ldapUsername = $ldapConfig->{$o}{'user'} . ',' . $searchBase;
423 423
        $ldapPassword = $ldapConfig->{$o}{'password'};
424 424
    }
425 425

  
......
512 512
    
513 513
    my $errorMessage = 0;
514 514
    my $ldap;
515

  
516
    my $ldapUsername = $ldapConfig->{$o}{'user'} . ',' . $searchBase;
517 515
    
518 516
    #if main ldap server is down, a html file containing warning message will be returned
519 517
    $ldap = Net::LDAP->new($ldapurl, timeout => $timeout) or handleLDAPBindFailure($ldapurl);
......
521 519
    #$ldap->start_tls( verify => 'require',
522 520
                      #cafile => '/usr/share/ssl/ldapcerts/cacert.pem');
523 521
    $ldap->start_tls( verify => 'none');
524
    my $bindresult = $ldap->bind( version => 3, dn => $ldapUsername, 
522
    my $bindresult = $ldap->bind( version => 3, dn => $bindDN, 
525 523
                                  password => $bindPass );
526 524
    if ($bindresult->code) {
527
        $errorMessage = "Failed to log in. Are you sure your authentication client username/password " .
528
                        "password is correct? Please check your configuration and try again...";
525
        $errorMessage = "Failed to log in. Are you sure your connection credentails are " .
526
                        "correct? Please correct and try again...";
529 527
        return $errorMessage;
530 528
    }
531 529

  

Also available in: Unified diff