mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Clean the garbage character after the duplicated charset property
Pull request #148 by zimmerle doesn't fix the problem. '\0' in format string won't be processed by "ngx_vslprintf". When the garbage character is '\n' or '\r', http response is cracked and browsers may go crashing.
This commit is contained in:
@@ -615,7 +615,7 @@ ngx_http_modsecurity_load_headers_out(ngx_http_request_t *r)
|
||||
}
|
||||
|
||||
ngx_snprintf(content_type, content_type_len,
|
||||
"%V; charset=%V\0",
|
||||
"%V; charset=%V%Z",
|
||||
&r->headers_out.content_type,
|
||||
&r->headers_out.charset);
|
||||
|
||||
|
Reference in New Issue
Block a user