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

This commit is contained in:
2024-01-04 11:51:06 +11:00
parent e8abd27f3c
commit f0e9751563

View File

@@ -55,7 +55,10 @@ func LoadLdapCert() {
// only try to load certificate from file if the command line argument was specified
ldapCertFile := os.Getenv("LDAP_TRUST_CERT_FILE")
if ldapCertFile != "" {
if ldapCertFile == "" {
fmt.Printf("LoadLdapCert no certificate specified\n")
return
} else {
// Try to read the file
cf, err := os.ReadFile(GetFilePath(ldapCertFile))
if err != nil {
@@ -121,6 +124,8 @@ func VerifyLdapCreds(username string, password string) bool {
if err != nil {
fmt.Printf("VerifyLdapCreds error binding to LDAP with supplied credentials : '%s'\n", err)
return false
} else {
fmt.Printf("VerifyLdapCreds successfully bound to LDAP\n")
}
searchReq := ldap.NewSearchRequest(