Require authorized user to download diagnostics.zip
Tested manually: before the code change, visiting the zip file URL
successfully generated and downloaded the diagnostics .zip file; after
the fix, the GET now returns " [403 Forbidden] " from an anonymous
window, but generates the .zip file when the admin is logged in.
diff --git a/src/com/google/enterprise/adaptor/Dashboard.java b/src/com/google/enterprise/adaptor/Dashboard.java
index 3e47311..80163dc 100644
--- a/src/com/google/enterprise/adaptor/Dashboard.java
+++ b/src/com/google/enterprise/adaptor/Dashboard.java
@@ -87,7 +87,9 @@
addFilters(scope.createContext("/rpc", createAdminSecurityHandler(
rpcHandler, config, sessionManager, secure)));
addFilters(scope.createContext("/diagnostics-support.zip",
- new DownloadDumpHandler(config.getFeedName().replace('_', '-'))));
+ createAdminSecurityHandler(new DownloadDumpHandler(
+ config.getFeedName().replace('_', '-')),
+ config, sessionManager, secure)));
addFilters(scope.createContext("/",
new RedirectHandler(contextPrefix + "/dashboard")));
}