Closed
Description
As a security protection it would be nice if HttpRequestMessage.Headers.Add
would check whether the value contains new lines. If you are allowing your users to send a certain header value, many people probably don't think about the following attack vector:
var headerValue = "<user-input>";
httpRequestMessage.Headers.Add("x-my-header", headerValue);
// user-input == "test\nx-other-header=value" // whoups
What do you think?
Best regards,
D.R.