Force bindname to be a string instead of a list
issue4383 review8791002
This commit is contained in:
@@ -44,9 +44,9 @@ def ldap_connection():
|
||||
if 'tls' in uri.scheme:
|
||||
conn.start_tls_s()
|
||||
|
||||
bindname = extensions.get('bindname')
|
||||
bindname, = extensions.get('bindname', [None])
|
||||
if not bindname:
|
||||
bindname = extensions.get('!bindname')
|
||||
bindname, = extensions.get('!bindname', [None])
|
||||
if bindname:
|
||||
# XXX find better way to get the password
|
||||
conn.simple_bind_s(bindname, config.get(section, 'bind_pass'))
|
||||
|
||||
Reference in New Issue
Block a user