On 8/14/18 11:47 PM, [email protected] wrote:
> Author: covener
> Date: Tue Aug 14 21:47:22 2018
> New Revision: 1838055
>
> URL: http://svn.apache.org/viewvc?rev=1838055&view=rev
> Log:
> Add StrictHostCheck
>
> .. to allow ucnonfigured hostnames to be rejected.
>
> The checks happen during NVH mapping and checks that the
> mapped VH itself has the host as a name or alias.
>
>
> Modified:
> httpd/httpd/trunk/CHANGES
> httpd/httpd/trunk/docs/manual/mod/core.xml
> httpd/httpd/trunk/include/http_core.h
> httpd/httpd/trunk/include/http_vhost.h
> httpd/httpd/trunk/server/core.c
> httpd/httpd/trunk/server/protocol.c
> httpd/httpd/trunk/server/vhost.c
> Modified: httpd/httpd/trunk/server/core.c
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1838055&r1=1838054&r2=1838055&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/core.c (original)
> +++ httpd/httpd/trunk/server/core.c Tue Aug 14 21:47:22 2018
> @@ -525,6 +525,7 @@ static void *create_core_server_config(a
> conf->protocols = apr_array_make(a, 5, sizeof(const char *));
> conf->protocols_honor_order = -1;
> conf->async_filter = 0;
> + conf->strict_host_check= AP_CORE_CONFIG_UNSET;
>
> return (void *)conf;
> }
> @@ -620,6 +621,12 @@ static void *merge_core_server_configs(a
> ? virt->flush_max_pipelined
> : base->flush_max_pipelined;
>
> + conf->strict_host_check = (virt->strict_host_check !=
> AP_CORE_CONFIG_UNSET)
> + ? virt->strict_host_check
> + : base->strict_host_check;
> +
> + AP_CORE_MERGE_FLAG(strict_host_check, conf, base, virt);
> +
Isn't the above doing the same thing twice? Or better is the above ternary not
the expanded macro below?
> return conf;
> }
Regards
RĂ¼diger