mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-17 16:36:49 +00:00
fix: normalize fields capitalization
This commit is contained in:
parent
2957b4605b
commit
ff2f00498c
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
"net/http"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"golang.org/x/text/cases"
|
||||
|
|
@ -190,7 +191,7 @@ var userPutHandler = withSelfOrAdmin(func(w http.ResponseWriter, r *http.Request
|
|||
}
|
||||
|
||||
for _, field := range req.Which {
|
||||
if _, ok := sensibleFields[field]; ok {
|
||||
if _, ok := sensibleFields[strings.ToLower(field)]; ok {
|
||||
if !users.CheckPwd(req.CurrentPassword, d.user.Password) {
|
||||
return http.StatusBadRequest, fberrors.ErrCurrentPasswordIncorrect
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue