use only first line from multi-line password entries (and strip whitespace)
This commit is contained in:
@@ -26,7 +26,10 @@ def search(*, config: Config, arguments: Arguments) -> typing.Iterable[Result]:
|
||||
if arguments.krb:
|
||||
ldap_con.sasl_gssapi_bind_s()
|
||||
else:
|
||||
ldap_con.simple_bind_s(realm.account, config.get_password(realm))
|
||||
password = config.get_password(realm)
|
||||
# use only first line (and without whitespace); assume remaining lines are comments/...
|
||||
password = password.splitlines()[0].strip()
|
||||
ldap_con.simple_bind_s(realm.account, password)
|
||||
|
||||
assert arguments.base
|
||||
assert arguments.filter
|
||||
|
||||
Reference in New Issue
Block a user