| Index: net/http/http_util.cc
|
| diff --git a/net/http/http_util.cc b/net/http/http_util.cc
|
| index 1f1ef91d01e3ea33bc8e904f689321f26ecccc71..313da11a66f118b55043627976c6e7164f527c8b 100644
|
| --- a/net/http/http_util.cc
|
| +++ b/net/http/http_util.cc
|
| @@ -347,9 +347,8 @@ bool HttpUtil::IsValidHeaderName(const std::string& name) {
|
|
|
| // static
|
| bool HttpUtil::IsValidHeaderValue(const std::string& value) {
|
| - // Just a sanity check: disallow NUL and CRLF.
|
| - return value.find('\0') == std::string::npos &&
|
| - value.find("\r\n") == std::string::npos;
|
| + // Just a sanity check: disallow NUL, CR and LF.
|
| + return value.find_first_of("\0\r\n", 0, 3) == std::string::npos;
|
| }
|
|
|
| // static
|
|
|