Fix NPE in GitWebServlet

Bug: Issue 3289
Change-Id: I6c2a9e231343c3790ec913e1bf5de37f319d616a
This commit is contained in:
David Pursehouse 2015-04-13 14:53:21 +09:00
parent d92fb7b037
commit b4c5a0e23f

View File

@ -360,15 +360,18 @@ class GitWebServlet extends HttpServlet {
}
final Map<String, String> params = getParameters(req);
if (deniedActions.contains(params.get("a"))) {
rsp.sendError(HttpServletResponse.SC_FORBIDDEN);
return;
}
String a = params.get("a");
if (a != null) {
if (deniedActions.contains(a)) {
rsp.sendError(HttpServletResponse.SC_FORBIDDEN);
return;
}
if (params.get("a").equals(PROJECT_LIST_ACTION)) {
rsp.sendRedirect(req.getContextPath() + "/#" + PageLinks.ADMIN_PROJECTS
+ "?filter=" + Url.encode(params.get("pf") + "/"));
return;
if (a.equals(PROJECT_LIST_ACTION)) {
rsp.sendRedirect(req.getContextPath() + "/#" + PageLinks.ADMIN_PROJECTS
+ "?filter=" + Url.encode(params.get("pf") + "/"));
return;
}
}
String name = params.get("p");