DescriptionMake calling SetHeader() with invalid value fatal
crrev.com/2134083003 made net::HttpUtil::IsValidHeaderValue() reject
individual CR and NL as well as CRNL.
I believe that all callers of net::HttpRequestHeaders::SetHeader() and
SetHeaderIfMissing() which use user-supplied values already verify the
value with IsValidHeaderValue() first. However, to be sure, temporarily
make it a fatal error to call SetHeader() with an invalid value.
If you see a crash attributed to this CL:
1. Associate it with the bug.
2. Follow the stack flow to work out how untrusted data ended up
being passed to SetHeader().
3. Add a call to IsValidHeaderValue() at the point where the untrusted
data was introduced. A tighter check such as IsToken() may be appopriate.
BUG=627398
Committed: https://crrev.com/c5c1a790acc423f359c22641ac2ab0f3f9e6d7a9
Cr-Commit-Position: refs/heads/master@{#405702}
Patch Set 1 #
Messages
Total messages: 15 (7 generated)
|