mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Parse and return proper errors with x-amz-security-token (#6766)
This PR also simplifies the token and access key validation across our signature handling.
This commit is contained in:
committed by
Nitish Tiwari
parent
88959ce600
commit
bf414068a3
@@ -178,11 +178,11 @@ func getRedirectPostRawQuery(objInfo ObjectInfo) string {
|
||||
|
||||
// Returns access key in the request Authorization header.
|
||||
func getReqAccessKey(r *http.Request, region string) (accessKey string) {
|
||||
accessKey, _, _ = getReqAccessKeyV4(r, region)
|
||||
if accessKey == "" {
|
||||
accessKey, _, _ = getReqAccessKeyV2(r)
|
||||
cred, _, _ := getReqAccessKeyV4(r, region)
|
||||
if cred.AccessKey == "" {
|
||||
cred, _, _ = getReqAccessKeyV2(r)
|
||||
}
|
||||
return accessKey
|
||||
return cred.AccessKey
|
||||
}
|
||||
|
||||
// Extract request params to be sent with event notifiation.
|
||||
|
||||
Reference in New Issue
Block a user