From c828cf2db88956094a31a79741145688876879df Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 23 May 2014 08:17:11 -0400 Subject: Use Guice-Servlet rather than custom code and expose the Injector This is a fairly functional variation of Gitblit with one notable exception: The security filters are not working properly. This is a design flaw in Guice that I have reported upstream [1]. The general idea is that Guice-Servlet filters are not properly wrapping the ServletRequest. This has historically been a problem for Guice-Servlet servlets but Google has fixed most of those issues. Unfortunately, all the same flaws reported against the servlet delegation also exist in Guice-Servlet filter delegation. :( [1]: https://code.google.com/p/google-guice/issues/detail?id=807 --- src/main/java/com/gitblit/manager/GitblitManager.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/com/gitblit/manager/GitblitManager.java') diff --git a/src/main/java/com/gitblit/manager/GitblitManager.java b/src/main/java/com/gitblit/manager/GitblitManager.java index 98ad33e7..a0718f77 100644 --- a/src/main/java/com/gitblit/manager/GitblitManager.java +++ b/src/main/java/com/gitblit/manager/GitblitManager.java @@ -87,6 +87,7 @@ import com.google.gson.Gson; import com.google.gson.JsonIOException; import com.google.gson.JsonSyntaxException; import com.google.gson.reflect.TypeToken; +import com.google.inject.Injector; /** * GitblitManager is an aggregate interface delegate. It implements all the manager @@ -656,6 +657,11 @@ public class GitblitManager implements IGitblit { return runtimeManager.getStatus(); } + @Override + public Injector getInjector() { + return runtimeManager.getInjector(); + } + /* * NOTIFICATION MANAGER */ -- cgit v1.2.3