Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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!");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment