forked from shaba/openuds
Fixed LDAP regex user search
This commit is contained in:
parent
58886b00fa
commit
82c362b2b6
@ -43,7 +43,7 @@ import ldap
|
|||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
__updated__ = '2018-02-01'
|
__updated__ = '2018-09-04'
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ class RegexLdap(auths.Authenticator):
|
|||||||
for r in ldaputil.getAsDict(
|
for r in ldaputil.getAsDict(
|
||||||
con=self.__connection(),
|
con=self.__connection(),
|
||||||
base=self._ldapBase,
|
base=self._ldapBase,
|
||||||
ldapFilter='(&(&(objectClass={})({}={}*))(objectCategory=person))'.format(self._userClass, self._userIdAttr, ldaputil.escape(pattern)),
|
ldapFilter='(&(&(objectClass={})({}={}*)))'.format(self._userClass, self._userIdAttr, ldaputil.escape(pattern)),
|
||||||
attrList=None, # All attrs
|
attrList=None, # All attrs
|
||||||
sizeLimit=LDAP_RESULT_LIMIT
|
sizeLimit=LDAP_RESULT_LIMIT
|
||||||
):
|
):
|
||||||
|
@ -98,7 +98,7 @@ def connection(username, password, host, port=-1, ssl=False, timeout=3, debug=Fa
|
|||||||
logger.exception('Exception connection:')
|
logger.exception('Exception connection:')
|
||||||
raise LDAPError('{}'.format(e))
|
raise LDAPError('{}'.format(e))
|
||||||
|
|
||||||
logger.debug('Conneciton was success')
|
logger.debug('Connection was successful')
|
||||||
return l
|
return l
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ def udsJs(context):
|
|||||||
'customAuth': reverse('uds.web.views.customAuth', kwargs={'idAuth': ''}),
|
'customAuth': reverse('uds.web.views.customAuth', kwargs={'idAuth': ''}),
|
||||||
'services': reverse('modern.services'),
|
'services': reverse('modern.services'),
|
||||||
'enabler': reverse('ClientAccessEnabler', kwargs={ 'idService': 'param1', 'idTransport': 'param2' }),
|
'enabler': reverse('ClientAccessEnabler', kwargs={ 'idService': 'param1', 'idTransport': 'param2' }),
|
||||||
|
'galeryImage': reverse('galleryImage', kwargs={ 'idImage': 'param1' }),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user