From: Eric Covener Date: Sat, 31 Oct 2009 15:09:09 +0000 (+0000) Subject: require LDAPReferralHopLimit > 0 X-Git-Tag: 2.3.3~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c09a39aac92b1fbe09b1d01bb6b33c2af40c287c;p=apache require LDAPReferralHopLimit > 0 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831549 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index d771fc8ef5..7bf7213673 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -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);