}
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("/")) {
}
public static String extractSerialFormCert(X509Certificate x509Certificate) {
- return x509Certificate.getSerialNumber().toString(16).toUpperCase();
+ return x509Certificate.getSerialNumber().toString(16).toLowerCase();
}
public static User fetchUserBySerial(String serial) {
- if ( !serial.matches("[A-Fa-f0-9]+")) {
+ if ( !serial.matches("[a-f0-9]+")) {
throw new Error("serial malformed.");
}
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);