mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +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:
parent
74ec784005
commit
b788ce2608
@ -615,7 +615,7 @@ ngx_http_modsecurity_load_headers_out(ngx_http_request_t *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngx_snprintf(content_type, content_type_len,
|
ngx_snprintf(content_type, content_type_len,
|
||||||
"%V; charset=%V\0",
|
"%V; charset=%V%Z",
|
||||||
&r->headers_out.content_type,
|
&r->headers_out.content_type,
|
||||||
&r->headers_out.charset);
|
&r->headers_out.charset);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user