From 83d9dc856393c06800da5d6a663a9b8fe07db962 Mon Sep 17 00:00:00 2001
From: Julian Rother <julian@jrother.eu>
Date: Wed, 17 Nov 2021 02:21:15 +0100
Subject: [PATCH] Fix FilterExtensibleMatch string encoding

---
 ldapserver/ldap.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ldapserver/ldap.py b/ldapserver/ldap.py
index 238b9bc..8fdb990 100644
--- a/ldapserver/ldap.py
+++ b/ldapserver/ldap.py
@@ -287,14 +287,14 @@ class FilterExtensibleMatch(asn1.Sequence, Filter):
 	dnAttributes: bool
 
 	def __str__(self):
-		parts = []
+		key = ''
 		if self.type is not None:
-			parts.append(self.type)
+			key += self.type
 		if self.dnAttributes:
-			parts.append('dn')
+			key += ':dn'
 		if self.matchingRule is not None:
-			parts.append(self.matchingRule)
-		return '(%s:=%s)'%(':'.join(parts), escape_filter_assertionvalue(self.matchValue))
+			key += ':' + self.matchingRule
+		return '(%s:=%s)'%(key, escape_filter_assertionvalue(self.matchValue))
 
 class SearchScope(enum.Enum):
 	''':any:`enum.Enum` of `scope` values in SEARCH operations'''
-- 
GitLab