summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2023-06-21 14:08:06 +0200
committerStefan Eissing <icing@apache.org>2023-06-21 14:08:06 +0200
commitece6bf4363980019bff0c7f676792a6112d1b424 (patch)
treefbb4e9b5836b2a55836254f742d4415e4d2cf8be /server
parent *) http_protocol: if there is a request and an error bucket in the input (diff)
downloadapache2-ece6bf4363980019bff0c7f676792a6112d1b424.tar.xz
apache2-ece6bf4363980019bff0c7f676792a6112d1b424.zip
http_protocol: make request processing more robust for incomplete data
- Length restrictions may error on a too long request path, leaving the uri unset. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910533 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/protocol.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/protocol.c b/server/protocol.c
index f9ab8b52f0..9ac4e3fe92 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -1368,9 +1368,16 @@ AP_DECLARE(request_rec *) ap_read_request(conn_rec *conn)
headers = breq->headers? apr_table_clone(r->pool, breq->headers) : NULL;
}
+ if (!method || !uri || !protocol) {
+ access_status = berr? ((ap_bucket_error *)(berr->data))->status :
+ HTTP_INTERNAL_SERVER_ERROR;
+ goto die_unusable_input;
+ }
+
if (headers) {
r->headers_in = headers;
}
+
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
"checking request: %s %s %s",
method, uri, protocol);