]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't completely ignore md5secret from LDAP if the value does not begin with {md5}.
authorRussell Bryant <russell@russellbryant.com>
Wed, 29 Sep 2010 20:15:57 +0000 (20:15 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 29 Sep 2010 20:15:57 +0000 (20:15 +0000)
This fixes a problem that lmadsen ran in to where md5secret was not working for him.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@289332 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_config_ldap.c

index ea2ad749af29d7993c69d84295dfb8c3610f2959..6c91ccc989470c66a1df67b86aaff20534c6d710 100644 (file)
@@ -293,8 +293,6 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
                                if (is_realmed_password_attribute) {
                                        if (!strncasecmp(valptr, "{md5}", 5)) {
                                                valptr += 5;
-                                       } else {
-                                               valptr = NULL;
                                        }
                                        ast_debug(2, "md5: %s\n", valptr);
                                }
@@ -414,8 +412,6 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
                                                if (is_realmed_password_attribute) {
                                                        if (strncasecmp(valptr, "{md5}", 5) == 0) {
                                                                valptr += 5;
-                                                       } else {
-                                                               valptr = NULL;
                                                        }
                                                        ast_debug(2, "md5: %s\n", valptr);
                                                }