Skip to content
Snippets Groups Projects
Commit c5663dec authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Fix gravely wrong is_verified_by_apache (wrong code version)

parent 1ffb12f9
No related branches found
No related tags found
No related merge requests found
...@@ -360,10 +360,11 @@ class X509Authenticator(PlainAuthenticator): ...@@ -360,10 +360,11 @@ class X509Authenticator(PlainAuthenticator):
def is_verified_by_apache(self, env, args): def is_verified_by_apache(self, env, args):
# Allows correct work while SSLVerifyClient both "optional" and "required" # Allows correct work while SSLVerifyClient both "optional" and "required"
verify = env.get("SSL_CLIENT_VERIFY") verify = env.get("SSL_CLIENT_VERIFY")
if verify != "SUCCESS": if verify == "SUCCESS":
return True
exception = self.req.error(message="authenticate: certificate verification failed", error=403, args = args, ssl_client_verify=verify, cert=env.get("SSL_CLIENT_CERT")) exception = self.req.error(message="authenticate: certificate verification failed", error=403, args = args, ssl_client_verify=verify, cert=env.get("SSL_CLIENT_CERT"))
exception.log(self.log) exception.log(self.log)
return None return False
def authenticate(self, env, args): def authenticate(self, env, args):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment