ldap login logic, subsonic api hex encrypted password

This commit is contained in:
2025-09-21 08:02:10 +02:00
parent e5c192c83c
commit 6fba25ca0b
3 changed files with 28 additions and 7 deletions

No files matched your search

+2 -1
View File
@@ -11,6 +11,7 @@ import (
"github.com/go-ldap/ldap/v3"
)
//nolint:gochecknoglobals
var ldapStore = make(LDAPStore)
// LDAPStore maps users to a cached password
@@ -128,7 +129,7 @@ func createUserFromLDAP(username string, dbc *db.DB, config Config, l *ldap.Conn
isAdmin := doesLDAPAdminExist(username, config, l)
log.Println(username, isAdmin)
if doesLDAPUserExist(username, config, l) && !isAdmin {
if !doesLDAPUserExist(username, config, l) {
return errors.New("no such user")
}