From: Eric Covener Date: Sun, 26 Apr 2026 16:30:43 +0000 (+0000) Subject: scan outgoing status line for newlines and controls X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38809faac18bfc8e610b4196c6dad6f481aa1376;p=thirdparty%2Fapache%2Fhttpd.git scan outgoing status line for newlines and controls git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933359 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 004c3c2a6b..8e5f76102e 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -990,6 +990,11 @@ static apr_status_t validate_status_line(request_rec *r) r->status_line = apr_pstrcat(r->pool, r->status_line, " ", NULL); return APR_EGENERAL; } + /* Check for newlines and control characters */ + if (len > 4 && *ap_scan_http_field_content(r->status_line + 4)) { + r->status_line = NULL; + return APR_EGENERAL; + } return APR_SUCCESS; } return APR_EGENERAL;