Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,13 @@ protected Response handle(final Request request) throws IOException {
if (handler != null) {
final String bucket = request.getParam("bucket");
if (bucket != null && permittedBucket.equals(bucket) == false) {
// allow a null bucket to support bucket-free APIs
return newError(request.getId(), RestStatus.FORBIDDEN, "AccessDenied", "Bad bucket", "");
// allow a null bucket to support the multi-object-delete API which
// passes the bucket name in the host header instead of the URL.
if (buckets.containsKey(bucket)) {
return newError(request.getId(), RestStatus.FORBIDDEN, "AccessDenied", "Bad bucket", "");
} else {
return newBucketNotFoundError(request.getId(), bucket);
}
}
return handler.handle(request);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ setup:
---
"Register a repository with a non existing bucket":

- skip:
version: all
reason: to be fixed

- do:
catch: /repository_exception/
snapshot.create_repository:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ setup:
---
"Register a repository with a non existing bucket":

- skip:
version: all
reason: to be fixed

- do:
catch: /repository_exception/
snapshot.create_repository:
Expand Down