[MNT-23896] run handleClientAuth only when this.enforce variable is true (#2248)

This commit is contained in:
Manish Kumar
2023-10-13 14:25:49 +05:30
committed by GitHub
parent 3e91bf6739
commit 2cc0137be3

View File

@@ -74,8 +74,6 @@ public abstract class X509ServletFilterBase implements Filter
logger.debug("Initializing X509ServletFilter"); logger.debug("Initializing X509ServletFilter");
} }
this.handleClientAuth();
this.enforce = checkEnforce(config.getServletContext()); this.enforce = checkEnforce(config.getServletContext());
if(logger.isDebugEnabled()) if(logger.isDebugEnabled())
@@ -85,6 +83,8 @@ public abstract class X509ServletFilterBase implements Filter
if (this.enforce) if (this.enforce)
{ {
this.handleClientAuth();
/* /*
* We are enforcing so get the cert-contains string. * We are enforcing so get the cert-contains string.
*/ */