Revert "fix index out of range"

This reverts commit 4792e07228.
This commit is contained in:
chrislu 2022-04-20 09:40:24 -07:00
parent 4792e07228
commit 3aa4dc6ad5

View file

@ -382,7 +382,7 @@ func (iama *IamApiServer) DeleteAccessKey(s3cfg *iam_pb.S3ApiConfiguration, valu
// "If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web // "If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web
// Services access key ID signing the request." // Services access key ID signing the request."
func handleImplicitUsername(r *http.Request, values url.Values) { func handleImplicitUsername(r *http.Request, values url.Values) {
if values.Get("UserName") == "" && len(r.Header["Authorization"]) > 0 { if values.Get("UserName") == "" {
// get username who signs the request // get username who signs the request
userName := strings.Split(r.Header["Authorization"][0], "/")[2] userName := strings.Split(r.Header["Authorization"][0], "/")[2]
values.Set("UserName", userName) values.Set("UserName", userName)