From 78753bc22f140f863aa3fe56b1c59699ca3e2fa8 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 26 Sep 2011 22:29:07 -0400 Subject: [PATCH] Protect DownloadZipServlet with an AccessRestrictionFilter. --- src/com/gitblit/GitBlitServer.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/com/gitblit/GitBlitServer.java b/src/com/gitblit/GitBlitServer.java index 92305fc..039f59d 100644 --- a/src/com/gitblit/GitBlitServer.java +++ b/src/com/gitblit/GitBlitServer.java @@ -65,7 +65,7 @@ private static Logger logger; - public static void main(String[] args) { + public static void main(String... args) { Params params = new Params(); JCommander jc = new JCommander(params); try { @@ -176,7 +176,7 @@ } if (params.securePort < 1024 && !isWindows()) { logger.warn("Gitblit needs to run with ROOT permissions for ports < 1024!"); - } + } connectors.add(secureConnector); } else { logger.warn("Failed to find or load Keystore?"); @@ -237,7 +237,7 @@ // Setup the GitBlit context GitBlit gitblit = GitBlit.self(); - gitblit.configureContext(settings); + gitblit.configureContext(settings, true); rootContext.addEventListener(gitblit); try { @@ -315,7 +315,7 @@ connector.setMaxIdleTime(30000); return connector; } - + /** * Tests to see if the operating system is Windows. * @@ -376,6 +376,9 @@ } } + /** + * JCommander Parameters class for GitBlitServer. + */ @Parameters(separators = " ") private static class Params { -- Gitblit v1.9.1