From: Amos Jeffries Date: Mon, 18 Jan 2010 01:09:32 +0000 (+1300) Subject: Limit language negotiation to bundled error pages X-Git-Tag: SQUID_3_2_0_1~460 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30b78ef1d65659b07903e7f54cc04d58359fd944;p=thirdparty%2Fsquid.git Limit language negotiation to bundled error pages --- diff --git a/src/errorpage.cc b/src/errorpage.cc index b0b773ebfd..f3e6cb553b 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -962,9 +962,10 @@ ErrorState::BuildContent() int l = 0; /** error_directory option in squid.conf overrides translations. + * Custom errors are always found either in error_directory or the templates directory. * Otherwise locate the Accept-Language header */ - if (!Config.errorDirectory && request && request->header.getList(HDR_ACCEPT_LANGUAGE, &hdr) ) { + if (!Config.errorDirectory && page_id < ERR_MAX && request && request->header.getList(HDR_ACCEPT_LANGUAGE, &hdr) ) { size_t pos = 0; // current parsing position in header string char *reset = NULL; // where to reset the p pointer for each new tag file