James Moger
2012-11-23 3983a6e74d69ed38853c3e89616de3266dcca40d
src/com/gitblit/wicket/pages/BasePage.java
@@ -131,13 +131,16 @@
   }   
   private void login() {
      // try to authenticate by servlet request
      UserModel user = GitBlit.self().authenticate(((WebRequest) getRequestCycle().getRequest()).getHttpServletRequest());
      if (user == null) {
         // try to authenticate by cookie
      Cookie[] cookies = ((WebRequest) getRequestCycle().getRequest()).getCookies();
      UserModel user = null;
      if (GitBlit.self().allowCookieAuthentication() && cookies != null && cookies.length > 0) {
         // Grab cookie from Browser Session
         user = GitBlit.self().authenticate(cookies);
      } else {
         user = GitBlit.self().authenticate(((WebRequest) getRequestCycle().getRequest()).getHttpServletRequest());
         }
      }
      // Login the user