summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-12-14 15:35:56 +0000
committerYann Ylavic <ylavic@apache.org>2021-12-14 15:35:56 +0000
commita962ba73047b5478d702c8ad09fd1a167e1d3736 (patch)
tree22c24e832b0c94b528cec9835c0a7d604057e5d5 /include
parent40e1770b161192f9f64815e2294eef8db4a325ee (diff)
downloadhttpd-a962ba73047b5478d702c8ad09fd1a167e1d3736.tar.gz
Merge r1895914, r1895921 from trunk:
*) http: Enforce that fully qualified uri-paths not to be forward-proxied have an http(s) scheme, and that the ones to be forward proxied have a hostname, per HTTP specifications. trunk patch: http://svn.apache.org/r1895914 http://svn.apache.org/r1895921 2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/286.patch backport PR: https://github.com/apache/httpd/pull/286 +1: ylavic, minfrin, gbechis mod_proxy: Detect unix: scheme syntax errors at load time. * modules/proxy/mod_proxy.c(add_pass, add_member, set_proxy_param, proxysection): Check return value of ap_proxy_de_socketfy(). * modules/proxy/proxy_util.c(ap_proxy_get_worker_ex): Check return value of ap_proxy_de_socketfy(). http: Enforce that fully qualified uri-paths not to be forward-proxied have an http(s) scheme, and that the ones to be forward proxied have a hostname, per HTTP specifications. The early checks avoid failing the request later on and thus save cycles for those invalid cases. Submitted by: ylavic Reviewed by: ylavic, minfrin, gbechis Closes #286 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895955 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/http_protocol.h7
2 files changed, 9 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index fe24261ee8..90ff1a86a6 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -586,6 +586,7 @@
* dav_find_attr().
* 20120211.120 (2.4.51-dev) Add dav_liveprop_elem structure and
* dav_get_liveprop_element().
+ * 20120211.121 (2.4.51-dev) Add ap_post_read_request()
*
*/
@@ -594,7 +595,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 120 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 121 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
diff --git a/include/http_protocol.h b/include/http_protocol.h
index 9ccac893fc..20bd202226 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -96,6 +96,13 @@ AP_DECLARE(void) ap_get_mime_headers(request_rec *r);
AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r,
apr_bucket_brigade *bb);
+/**
+ * Run post_read_request hook and validate.
+ * @param r The current request
+ * @return OK or HTTP_...
+ */
+AP_DECLARE(int) ap_post_read_request(request_rec *r);
+
/* Finish up stuff after a request */
/**