Skip to content

Can't use ReconnectLDAPObject to bind because of TypeError #448

@jnewbigin

Description

@jnewbigin

Issue description:
Using ReconnectLDAPObject results in an error:
TypeError: _store_last_bind() got multiple values for argument 'method'

Steps to reproduce:

connection = ldap.ldapobject.ReconnectLDAPObject(uri=uri, bytes_mode=False)
connection.bind_s(bind_dn, password, method=ldap.AUTH_SIMPLE)

bind_s invokes self._store_last_bind

self._store_last_bind(method=SimpleLDAPObject.bind_s,*('username', 'password'),**{'method': 128})

Which has 2 parameters called method and hence the exception.

In my case, I can omit the method=ldap.AUTH_SIMPLE but if I needed a different auth method then it would not work.

Operating system:
Linux

Python version:
3.8.11

python-ldap version:
python-ldap==3.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions