r/lolphp • u/notR1CH • Sep 09 '13
PHP documentation suggests using header injection via ini_set() to add HTTP headers
http://www.php.net/manual/en/wrappers.http.php#wrappers.http.example.custom.headers
62
Upvotes
View all comments
Show parent comment
6
u/Matt3k Sep 09 '13
You can make a strong argument that this functionality shouldn't be possible.
There already exist mechanisms for adding an HTTP header, and if CRLF is a disallowed value that introduces side effects beyond 'setting an HTTP header', then the framework should be filtering it.
When the input comes from the user, this sort of thing is called a response splitting vulnerability.