]> granicus.if.org Git - apache/commitdiff
require LDAPReferralHopLimit > 0
authorEric Covener <covener@apache.org>
Sat, 31 Oct 2009 15:09:09 +0000 (15:09 +0000)
committerEric Covener <covener@apache.org>
Sat, 31 Oct 2009 15:09:09 +0000 (15:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831549 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index d771fc8ef536001c5554c8cb1ff6a5e568a5eff4..7bf72136730b316f8b5d0a22c58587e28d6d558c 100644 (file)
@@ -2401,6 +2401,10 @@ static const char *util_ldap_set_referral_hop_limit(cmd_parms *cmd,
 
     dc->ReferralHopLimit = atol(hop_limit);
 
+    if (dc->ReferralHopLimit <= 0) { 
+        return "LDAPReferralHopLimit must be greater than zero (Use 'LDAPReferrals Off' to disable referral chasing)";
+    }
+
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
                  "LDAP: Limit chased referrals to maximum of %d hops.",
                  dc->ReferralHopLimit);