My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 183: Wrap gitweb.cgi and apply gerrit access controls
  Back to list
Status:  Released
Owner:  ----
Closed:  Oct 2012


Sign in to add a comment
 
Reported by code-rev...@gtempaccount.com, Sep 24, 2009
Reported by Shawn Pearce <sop@google.com> on Wed May 20 14:07:41 PDT 2009
Source: JIRA GERRIT-183
Affected Version: 2.0.12

Take an existing CGI servlet, e.g. Tomcat's
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/servlets/CGIServlet.html
or Jetty's http://www.mortbay.org/apidocs/org/mortbay/servlet/CGI.html as
either is covered by the same APLv2 license that Gerrit is.  Trim it down to
make running only gitweb possible, and to simplify the code we need to support
in any container, and then add in the gerrit call validation.  For that, see
Gerrit's existing CatServlet class:

      final Account.Id me = new GerritCall(server, req, rsp).getAccountId();
      ...
      final ProjectCache.Entry e =
            Common.getProjectCache().get(change.getDest().getParentKey());
      if (e == null || !canRead(me, e)) {
          rsp.sendError(HttpServletResponse.SC_NOT_FOUND);
          return;
      }
Sep 24, 2009
#1 sop+code@google.com
(No comment was entered for this change.)
Status: Accepted
Owner: ---
Nov 12, 2009
#2 sop+code@google.com
Implemented by Ic5739d0b8e52fb842f3d132300b58aa8b25bfdf6
Status: Fixed
Labels: FixedIn-2.0.25
Dec 18, 2009
#3 sop@google.com
(No comment was entered for this change.)
Labels: FixedIn-2.1
Oct 25, 2012
#4 sop@google.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting