summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-20 12:23:54 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-20 12:23:54 +0200
commit9290bf4447225bece69eda94e15bc3740832f6e9 (patch)
tree3075d0360fed26572f164652d57a1c3b4537c038 /pykolab
parentbb8862cd3044b1cad18fea869de8fd62ed70007c (diff)
downloadpykolab-9290bf4447225bece69eda94e15bc3740832f6e9.tar.gz
Avoid case-sensitive comparisons of otherwise case-insensitive matters (#1003587)
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/__init__.py4
-rw-r--r--pykolab/auth/ldap/__init__.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index 5c6d51c..04c286d 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -241,9 +241,9 @@ class Auth(pykolab.base.Base):
else:
self.domains = {}
for primary, secondaries in domains:
- self.domains[primary] = primary
+ self.domains[primary.lower()] = primary.lower()
for secondary in secondaries:
- self.domains[secondary] = primary
+ self.domains[secondary.lower()] = primary.lower()
return self.domains
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 6670d17..f597dfd 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -2099,10 +2099,10 @@ class LDAP(pykolab.base.Base):
# TODO: Where we use associateddomain is actually configurable
if type(domain_attrs[dna]) == list:
- primary_domain = domain_attrs[dna].pop(0)
- secondary_domains = domain_attrs[dna]
+ primary_domain = domain_attrs[dna].pop(0).lower()
+ secondary_domains = [x.lower() for x in domain_attrs[dna]]
else:
- primary_domain = domain_attrs[dna]
+ primary_domain = domain_attrs[dna].lower()
domains.append((primary_domain,secondary_domains))