@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
- if (req.getHeader("Host").equals(ServerConstants.getSecureHostNamePort())) {
+ if (req.getHeader("Host").equals(ServerConstants.getSecureHostNamePortSecure())) {
resp.getWriter().println(getLanguage(req).getTranslation("Authentication with certificate failed. Try another certificate or use a password."));
} else {
new LoginForm(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
}
private static String redirectPath(HttpServletRequest req) {
- String redir = (String) req.getSession().getAttribute(LOGIN_RETURNPATH);
+ String redir = (String) req.getAttribute(LOGIN_RETURNPATH);
String s = redir;
if (s != null) {
if ( !s.startsWith("/")) {
if (user.isInGroup(LOGIN_BLOCKED)) {
return;
}
+ req.setAttribute(LOGIN_RETURNPATH, req.getSession().getAttribute(LOGIN_RETURNPATH));
req.getSession().invalidate();
HttpSession hs = req.getSession();
hs.setAttribute(LOGGEDIN, true);