From: hno <> Date: Sat, 24 Aug 2002 07:54:34 +0000 (+0000) Subject: New squid.conf directive to disable hostname verifications. It isn't X-Git-Tag: SQUID_3_0_PRE1~827 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=036145b49784688a582447707f0d4b4aefb9c8b0;p=thirdparty%2Fsquid.git New squid.conf directive to disable hostname verifications. It isn't really our business to enforce what characters is used in hostnames. --- diff --git a/src/cf.data.pre b/src/cf.data.pre index 9bd73f3fe0..83911c1435 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.276 2002/08/21 09:12:44 hno Exp $ +# $Id: cf.data.pre,v 1.277 2002/08/24 01:54:34 hno Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1092,6 +1092,16 @@ DOC_START connection then turn this off. DOC_END +NAME: check_hostnames +TYPE: onoff +DEFAULT: on +LOC: Config.onoff.check_hostnames +DOC_START + For security and stability reasons Squid by default checks + hostnames for Internet standard RFC compliance. If you do not want + Squid to perform these checks then turn this directive off. +DOC_END + NAME: cache_dns_program TYPE: string IFDEF: USE_DNSSERVERS @@ -3809,12 +3819,11 @@ LOC: Config.onoff.pipeline_prefetch DEFAULT: off DOC_START To boost the performance of pipelined requests to closer - match that of a non-proxied environment Squid tries to fetch + match that of a non-proxied environment Squid can try to fetch up to two requests in parallell from a pipeline. - Note: This is known to be broken in Squid-DEVEL due to changes - in the internal store_client_copy() interface. Do not enable - for now. + Defaults to off for bandwidth management and access logging + reasons. DOC_END NAME: extension_methods diff --git a/src/structs.h b/src/structs.h index d8ffa169eb..dc1be6edd1 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.423 2002/08/09 10:57:43 robertc Exp $ + * $Id: structs.h,v 1.424 2002/08/24 01:54:34 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -589,6 +589,7 @@ struct _SquidConfig { int ie_refresh; int vary_ignore_expire; int pipeline_prefetch; + int check_hostnames; } onoff; acl *aclList; struct { diff --git a/src/url.cc b/src/url.cc index 9f242a4ab8..b7e3ca9239 100644 --- a/src/url.cc +++ b/src/url.cc @@ -1,6 +1,6 @@ /* - * $Id: url.cc,v 1.135 2002/08/19 22:47:54 hno Exp $ + * $Id: url.cc,v 1.136 2002/08/24 01:54:34 hno Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels @@ -304,7 +304,7 @@ urlParse(method_t method, char *url) *q = '\0'; } } - if (strspn(host, valid_hostname_chars) != strlen(host)) { + if (Config.onoff.check_hostnames && strspn(host, valid_hostname_chars) != strlen(host)) { debug(23, 1) ("urlParse: Illegal character in hostname '%s'\n", host); return NULL; }