From 3468973a442aa5d77ad2b97870ac86e7b139b461 Mon Sep 17 00:00:00 2001 From: PiNotEqual3 Date: Fri, 29 Apr 2016 11:22:15 +0200 Subject: [PATCH 1/2] Fix for Apache 2.4 see #15 --- pyntlm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyntlm.py b/pyntlm.py index 9d3f219..d080f32 100644 --- a/pyntlm.py +++ b/pyntlm.py @@ -276,7 +276,7 @@ def check_authorization(req, username, proxy): @return True if the user is authorized, False otherwise. ''' - rules = ''.join(req.requires()).strip() + rules = ''.join(req.get_options()['Require']) if rules=='valid-user' or cacheGroups.has(rules, username): return True groups = [] From 29540279c7c8969f92cd3bbb1bd9896f2925a407 Mon Sep 17 00:00:00 2001 From: PiNotEqual3 Date: Fri, 29 Apr 2016 11:29:00 +0200 Subject: [PATCH 2/2] Add option for Apach2.4 --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 0203e2e..39aa0ea 100644 --- a/README.rst +++ b/README.rst @@ -114,6 +114,7 @@ Usage is best shown by an example of Apache configuration: :: PythonOption Domain WDOMAIN PythonOption PDC 192.1.2.45 PythonOption BDC 192.1.2.46 + PythonOption Require valid-user # Bypass authentication for local clients. # Comment these lines if they should authenticate too.