https://fedorahosted.org/freeipa/ticket/2447

Validation of external member was failing for empty strings because of
wrong condition.

--
Regards,

Ondrej Hamada
FreeIPA team
jabber: oh...@jabbim.cz
IRC: ohamada

From 137c676c6c182f839cbcd9332f9d0f6d8d18b3f0 Mon Sep 17 00:00:00 2001
From: Ondrej Hamada <oham...@redhat.com>
Date: Tue, 3 Apr 2012 12:07:04 +0200
Subject: [PATCH] Fix empty external member processing

Validation of external member was failing for empty strings because of
wrong condition.

https://fedorahosted.org/freeipa/ticket/2447
---
 ipalib/plugins/baseldap.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 38f369a779adc53454837994bd2bec5b74d3bbd4..1c893018c6452b5979c2c721e325005cb0d676a9 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -326,7 +326,7 @@ def add_external_pre_callback(membertype, ldap, dn, keys, options):
     def validate_host(hostname):
         validate_hostname(hostname, check_fqdn=False, allow_underscore=True)
 
-    if membertype in options:
+    if membertype in options and options[membertype]:
         if membertype == 'host':
             validator = validate_host
         else:
-- 
1.7.6.5

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to