test again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-04 12:23:08 +11:00
parent 2398288e08
commit 55f7bacd7b

View File

@@ -105,14 +105,14 @@ func VerifyLdapCreds(username string, password string) bool {
InsecureSkipVerify: true,
}
// try connecting to AD via TLS and our custom certificate authority
// Add port if not specified in .env file
if strings.HasSuffix(ldapServer, ":636") {
ldaps, err = ldap.DialTLS("tcp", ldapServer, tlsConfig)
} else {
ldaps, err = ldap.DialTLS("tcp", fmt.Sprintf("%s:636", ldapServer), tlsConfig)
if !(strings.HasSuffix(ldapServer, ":636")) {
ldapServer = fmt.Sprintf("%s:636", ldapServer)
log.Printf("VerifyLdapCreds updated ldapServer string '%s'\n", ldapServer)
}
// try connecting to AD via TLS and our custom certificate authority
ldaps, err = ldap.DialTLS("tcp", ldapServer, tlsConfig)
if err != nil {
log.Printf("VerifyLdapCreds error connecting to LDAP bind address '%s' : '%s'\n", ldapServer, err)
return false