Bug fix: ensure DN is lowercase

main
Bryan De Houwer 2022-09-18 20:49:03 +02:00
parent 81d2061102
commit f391b8a2a6
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ def get_dns_resolver(server, context):
return dnsresolver
def ldap2domain(ldap):
return re.sub(',DC=', '.', ldap[ldap.find('dc='):], flags=re.I)[3:]
return re.sub(',DC=', '.', ldap[ldap.lower().find('dc='):], flags=re.I)[3:]
def new_record(rtype, serial):
nr = DNS_RECORD()
@ -347,4 +347,4 @@ class DNS_RPC_RECORD_TS(Structure):
try:
return datetime.datetime(1601,1,1) + datetime.timedelta(microseconds=microseconds)
except OverflowError:
return None
return None