Do not allow anonymous access to list buckets

Fixes #236.
pull/239/head
Andrew Gaul 2017-07-22 16:10:59 -07:00
rodzic ff68288e3a
commit 1e5ebadee4
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -674,8 +674,7 @@ public class S3ProxyHandler {
switch (method) { switch (method) {
case "GET": case "GET":
if (uri.equals("/")) { if (uri.equals("/")) {
handleContainerList(response, blobStore); throw new S3Exception(S3ErrorCode.ACCESS_DENIED);
return;
} else if (path.length <= 2 || path[2].isEmpty()) { } else if (path.length <= 2 || path[2].isEmpty()) {
String containerName = path[1]; String containerName = path[1];
ContainerAccess access = blobStore.getContainerAccess( ContainerAccess access = blobStore.getContainerAccess(