mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 12:40:24 +03:00
normalize users with double // in accessKeys (#11143)
Bonus fix, use constant time compare for secret keys in web-handlers.go:SetAuth()
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"path"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
@@ -358,7 +359,7 @@ func (a adminAPIHandlers) AddUser(w http.ResponseWriter, r *http.Request) {
|
||||
defer logger.AuditLog(w, r, "AddUser", mustGetClaimsFromToken(r))
|
||||
|
||||
vars := mux.Vars(r)
|
||||
accessKey := vars["accessKey"]
|
||||
accessKey := path.Clean(vars["accessKey"])
|
||||
|
||||
// Get current object layer instance.
|
||||
objectAPI := newObjectLayerFn()
|
||||
|
||||
Reference in New Issue
Block a user