NOW MANAGED ON CODEBERG
Change to allow override of CA CERT for LDAPS
Matt Moore06ef95dc5fc4
diff --git a/app/Access/LdapService.php b/app/Access/LdapService.phpindex 9d2667635..56e7aba04 100644--- a/app/Access/LdapService.php+++ b/app/Access/LdapService.php@@ -209,6 +209,12 @@ class LdapService$this->ldap->setOption(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);}+ // Specify CA Cert file for LDAP.+ // This option works globally and must be set before a connection is created.+ if ($this->config['tls_cacertfile']) {+ $this->ldap->setOption(null, LDAP_OPT_X_TLS_CACERTFILE, $this->config['tls_cacertfile']);+ }+$ldapHost = $this->parseServerString($this->config['server']);$ldapConnection = $this->ldap->connect($ldapHost);diff --git a/app/Config/services.php b/app/Config/services.phpindex a035f1056..a407b5dc8 100644--- a/app/Config/services.php+++ b/app/Config/services.php@@ -133,6 +133,7 @@ return ['group_attribute' => env('LDAP_GROUP_ATTRIBUTE', 'memberOf'),'remove_from_groups' => env('LDAP_REMOVE_FROM_GROUPS', false),'tls_insecure' => env('LDAP_TLS_INSECURE', false),+ 'tls_cacertfile' => env('LDAP_TLS_CACERTFILE', false),'start_tls' => env('LDAP_START_TLS', false),'thumbnail_attribute' => env('LDAP_THUMBNAIL_ATTRIBUTE', null),],