From 6cab6d802dbebfbe3dd0393272c12fdc0498f4f6 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 28 Aug 2017 11:39:48 -0700 Subject: [PATCH] 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 --- cmd/generic-handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index 504740863..b93892b99 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -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 }