1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-04 16:16:58 +02:00

only disallow streaming signed when no auth enabled

fix https://github.com/chrislusf/seaweedfs/issues/2101
This commit is contained in:
Chris Lu 2021-05-31 01:03:04 -07:00
parent 9774cac3a1
commit 2b60e2abb1

View file

@ -63,8 +63,8 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
}
dataReader := r.Body
rAuthType := getRequestAuthType(r)
if s3a.iam.isEnabled() {
rAuthType := getRequestAuthType(r)
var s3ErrCode s3err.ErrorCode
switch rAuthType {
case authTypeStreamingSigned:
@ -79,8 +79,7 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
return
}
} else {
rAuthType := getRequestAuthType(r)
if authTypeAnonymous != rAuthType {
if authTypeStreamingSigned == rAuthType {
writeErrorResponse(w, s3err.ErrAuthNotSetup, r.URL)
return
}