mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
api: Fix the conditional to check for reserved buckets. (#4856)
Current code was an logical `and` instead we should do `or`. Fixes https://github.com/minio/mc/issues/2231
This commit is contained in:
parent
ea65350308
commit
6cab6d802d
@ -213,7 +213,7 @@ func setPrivateBucketHandler(h http.Handler) http.Handler {
|
||||
func (h minioPrivateBucketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
// For all non browser requests, reject access to 'minioReservedBucketPath'.
|
||||
bucketName, _ := urlPath2BucketObjectName(r.URL)
|
||||
if !guessIsBrowserReq(r) && isMinioReservedBucket(bucketName) && isMinioMetaBucket(bucketName) {
|
||||
if !guessIsBrowserReq(r) && (isMinioReservedBucket(bucketName) || isMinioMetaBucket(bucketName)) {
|
||||
writeErrorResponse(w, ErrAllAccessDisabled, r.URL)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user