Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 2520403002: Add a configurable parse-depth limit when parsing JFV headers, and use it for Feature-Policy Header (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/HTTPParsers.cpp
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index 40ddcec6454cad61f728109a9950747f3037bae8..bd5257dece6b4a7ce03560d17ba556f50cd38c51 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -899,12 +899,14 @@ bool parseMultipartHeadersFromBody(const char* bytes,
}
// See https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01, Section 4.
-std::unique_ptr<JSONArray> parseJSONHeader(const String& header) {
+std::unique_ptr<JSONArray> parseJSONHeader(const String& header,
+ int maxParseDepth) {
StringBuilder sb;
sb.append("[");
sb.append(header);
sb.append("]");
- std::unique_ptr<JSONValue> headerValue = parseJSON(sb.toString());
+ std::unique_ptr<JSONValue> headerValue =
+ parseJSON(sb.toString(), maxParseDepth);
return JSONArray::from(std::move(headerValue));
}
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698