From c09a39aac92b1fbe09b1d01bb6b33c2af40c287c Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Sat, 31 Oct 2009 15:09:09 +0000 Subject: [PATCH] require LDAPReferralHopLimit > 0 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831549 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ldap/util_ldap.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.40.0