aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2021-05-24 12:28:19 +0500
committerGitHub <noreply@github.com>2021-05-24 12:28:19 +0500
commit84dce32a5781268f6dbd0101e3bab65c04e0a1c7 (patch)
tree5eb4f327c53e2525d372d19bce62984539c62e71 /weed/s3api/s3api_object_handlers.go
parentbb4263352251fb7ad02cfeb7f340b5b961d0d55a (diff)
parent359a08ecbad0b010811af367c2a2677fadfb53ae (diff)
downloadseaweedfs-84dce32a5781268f6dbd0101e3bab65c04e0a1c7.tar.xz
seaweedfs-84dce32a5781268f6dbd0101e3bab65c04e0a1c7.zip
Merge branch 'master' into head_check_all_chunks
Diffstat (limited to 'weed/s3api/s3api_object_handlers.go')
-rw-r--r--weed/s3api/s3api_object_handlers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index f1a539ac5..2dde17b4c 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -62,6 +62,12 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
writeErrorResponse(w, s3ErrCode, r.URL)
return
}
+ } else {
+ rAuthType := getRequestAuthType(r)
+ if authTypeAnonymous != rAuthType {
+ writeErrorResponse(w, s3err.ErrAuthNotSetup, r.URL)
+ return
+ }
}
defer dataReader.Close()