Commit 4d0ef143 authored by Larbi Gharib's avatar Larbi Gharib Committed by Adrien Béraud
Browse files

Fix no crl on login

Change-Id: I67098c08a4e4559a2f61ab1cd3d23abe542a9063
parent 72c34a45
......@@ -84,8 +84,8 @@ public class LoginServlet extends HttpServlet {
StatementElement statementElement = new StatementElement("username", "=", object.getUsername(), "");
statementList.addStatement(statementElement);
User user = dataStore.getUserDao().getObjects(statementList).get(0);
if(certificateAuthority.getLatestCRL().get() != null) {
if(!user.getAccessLevelName().equals("ADMIN") && certificateAuthority.getLatestCRL().get().getRevokedCertificate(user.getCertificate().getSerialNumber()) != null)
if(!user.getAccessLevelName().equals("ADMIN") && certificateAuthority.getLatestCRL().get() != null) {
if(certificateAuthority.getLatestCRL().get().getRevokedCertificate(user.getCertificate().getSerialNumber()) != null)
TomcatCustomErrorHandler.sendCustomError(resp, 401, "Invalid credentials provided!");
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment