mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Fix validation in PutBucketNotification handler (#4841)
Fixes #4813 If a TopicConfiguration element or CloudFunction element is found in configuration submitted to PutBucketNotification API, an BadRequest error is returned.
This commit is contained in:
committed by
Dee Koder
parent
3a73c675a6
commit
77d2870f5b
@@ -129,6 +129,7 @@ const (
|
||||
ErrFilterNameSuffix
|
||||
ErrFilterValueInvalid
|
||||
ErrOverlappingConfigs
|
||||
ErrUnsupportedNotification
|
||||
|
||||
// S3 extended errors.
|
||||
ErrContentSHA256Mismatch
|
||||
@@ -552,6 +553,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{
|
||||
Description: "Configurations overlap. Configurations on the same bucket cannot share a common event type.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrUnsupportedNotification: {
|
||||
Code: "UnsupportedNotification",
|
||||
Description: "Minio server does not support Topic or Cloud Function based notifications.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrInvalidCopyPartRange: {
|
||||
Code: "InvalidArgument",
|
||||
Description: "The x-amz-copy-source-range value must be of the form bytes=first-last where first and last are the zero-based offsets of the first and last bytes to copy",
|
||||
|
||||
Reference in New Issue
Block a user