Skip to content

Commit 38809fa

Browse files
committed
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
1 parent eecbbca commit 38809fa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/http/http_filters.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,11 @@ static apr_status_t validate_status_line(request_rec *r)
990990
r->status_line = apr_pstrcat(r->pool, r->status_line, " ", NULL);
991991
return APR_EGENERAL;
992992
}
993+
/* Check for newlines and control characters */
994+
if (len > 4 && *ap_scan_http_field_content(r->status_line + 4)) {
995+
r->status_line = NULL;
996+
return APR_EGENERAL;
997+
}
993998
return APR_SUCCESS;
994999
}
9951000
return APR_EGENERAL;

0 commit comments

Comments
 (0)