mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-30 21:12:05 +00:00
LDAP auth: infer 'ldap_security = tls' from the URL prefix: ldaps:// => LDAPS
LDAP URIs starting with the scheme 'ldaps' are - by definition - meant to use LDAPS instead of plain LDAP: infer 'ldap_security' = "tls" if it is not set.
This commit is contained in:
parent
7eb0c66512
commit
c58eef4bac
1 changed files with 4 additions and 0 deletions
|
@ -118,6 +118,10 @@ class Auth(auth.BaseAuth):
|
||||||
elif tmp == "OPTIONAL":
|
elif tmp == "OPTIONAL":
|
||||||
self._ldap_ssl_verify_mode = ssl.CERT_OPTIONAL
|
self._ldap_ssl_verify_mode = ssl.CERT_OPTIONAL
|
||||||
|
|
||||||
|
if self._ldap_uri.lower().startswith("ldaps://") and self._ldap_security not in ("tls", "starttls"):
|
||||||
|
logger.info("Inferring 'ldap_security' = tls from 'ldap_uri' starting with 'ldaps://'")
|
||||||
|
self._ldap_security = "tls"
|
||||||
|
|
||||||
logger.info("auth.ldap_uri : %r" % self._ldap_uri)
|
logger.info("auth.ldap_uri : %r" % self._ldap_uri)
|
||||||
logger.info("auth.ldap_base : %r" % self._ldap_base)
|
logger.info("auth.ldap_base : %r" % self._ldap_base)
|
||||||
logger.info("auth.ldap_reader_dn : %r" % self._ldap_reader_dn)
|
logger.info("auth.ldap_reader_dn : %r" % self._ldap_reader_dn)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue