fix(subsonic): make getUser?username comparison case-insensitive
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
0c1b65d3e6
commit
fc9817552d
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package subsonic
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/navidrome/navidrome/conf"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
|
|
@ -40,7 +41,7 @@ func (api *Router) GetUser(r *http.Request) (*responses.Subsonic, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if username != loggedUser.UserName {
|
||||
if !strings.EqualFold(username, loggedUser.UserName) {
|
||||
return nil, newError(responses.ErrorAuthorizationFail)
|
||||
}
|
||||
response := newResponse()
|
||||
|
|
|
|||
Loading…
Reference in a new issue