pentoo-overlay/dev-python/impacket/files/840.patch

25 lines
1.4 KiB
Diff

From a1d2b978a7dc986d4a6c17a17f9ec170b2e298af Mon Sep 17 00:00:00 2001
From: ThePirateWhoSmellsOfSunflowers
<ThePirateWhoSmellsOfSunflowers@users.noreply.github.com>
Date: Mon, 27 Apr 2020 21:36:33 +0200
Subject: [PATCH] fix the comparison for paged results
---
impacket/ldap/ldap.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/impacket/ldap/ldap.py b/impacket/ldap/ldap.py
index f33a0296..21ba7753 100644
--- a/impacket/ldap/ldap.py
+++ b/impacket/ldap/ldap.py
@@ -397,8 +397,8 @@ def _handleControls(self, requestControls, responseControls):
for requestControl in requestControls:
if responseControls is not None:
for responseControl in responseControls:
- if requestControl['controlType'] == CONTROL_PAGEDRESULTS:
- if responseControl['controlType'] == CONTROL_PAGEDRESULTS:
+ if str(requestControl['controlType']) == CONTROL_PAGEDRESULTS:
+ if str(responseControl['controlType']) == CONTROL_PAGEDRESULTS:
if hasattr(responseControl, 'getCookie') is not True:
responseControl = decoder.decode(encoder.encode(responseControl),
asn1Spec=KNOWN_CONTROLS[CONTROL_PAGEDRESULTS]())[0]