mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip if entry.Extended map is nil.
This commit is contained in:
parent
ab966410d2
commit
c4f0fd6e1b
|
@ -125,10 +125,13 @@ func (s3a *S3ApiServer) DeleteBucketHandler(w http.ResponseWriter, r *http.Reque
|
||||||
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)
|
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if id, ok := entry.Extended[xhttp.AmzIdentityId]; ok {
|
|
||||||
if string(id) != r.Header.Get(xhttp.AmzIdentityId) {
|
if entry.Extended != nil {
|
||||||
writeErrorResponse(w, s3err.ErrAccessDenied, r.URL)
|
if id, ok := entry.Extended[xhttp.AmzIdentityId]; ok {
|
||||||
return
|
if string(id) != r.Header.Get(xhttp.AmzIdentityId) {
|
||||||
|
writeErrorResponse(w, s3err.ErrAccessDenied, r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,10 +169,13 @@ func (s3a *S3ApiServer) HeadBucketHandler(w http.ResponseWriter, r *http.Request
|
||||||
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)
|
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if id, ok := entry.Extended[xhttp.AmzIdentityId]; ok {
|
|
||||||
if string(id) != r.Header.Get(xhttp.AmzIdentityId) {
|
if entry.Extended != nil {
|
||||||
writeErrorResponse(w, s3err.ErrAccessDenied, r.URL)
|
if id, ok := entry.Extended[xhttp.AmzIdentityId]; ok {
|
||||||
return
|
if string(id) != r.Header.Get(xhttp.AmzIdentityId) {
|
||||||
|
writeErrorResponse(w, s3err.ErrAccessDenied, r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue