#204 500 Server Error from infoldap
Closed: Fixed None Opened 8 years ago by jdennis.

infoldap will throw a 500 server error if the ldap bind fails. The problem is the exception code references the base variable, but the base variable is uninitialized.

The code is around line 169 in infoldap:

    try:
        conn = self._ldap_bind()
        base = self.base_dn
        return self.get_user_data_from_conn(conn, dn, base, user)
    except ldap.LDAPError as e:
        self.error(
            'LDAP search failed for DN %s on base %s: %s' %
            (dn, base, e)
        )

so if the ldap_bind raises an exception base will not have been set and you won't get the LDAP error message, instead an undefined variable exception is raised from inside the exception code.


Patch available at https://pagure.io/ipsilon/pull-request/80

owner: => puiterwijk
patch_available: 0 => 1
status: new => accepted

This has been fixed with 26c4e68

milestone: => 1.2
resolution: => fixed
status: accepted => closed

Metadata Update from @puiterwijk:
- Issue assigned to puiterwijk
- Issue set to the milestone: 1.2

7 years ago

Login to comment on this ticket.

Metadata