Skip to content

Commit

Permalink
Fix else if ()
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaPictoris committed Aug 6, 2023
1 parent 9c56bf6 commit d139471
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/ctrlsubsonic/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ func (c *Controller) WithUser(next http.Handler) http.Handler {
var credsOk bool
if tokenAuth && newLDAPUser {
credsOk = checkCredsToken(user.Password, token, salt)
} else {
if newLDAPUser {
credsOk = checkCredsBasic(user.Password, password)
}
} else if newLDAPUser {
credsOk = checkCredsBasic(user.Password, password)
}
if !credsOk {
// Because internal authentication failed, we can now try to use LDAP, if
Expand Down

0 comments on commit d139471

Please sign in to comment.