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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp

Issue 2451673002: Trim leading and trailing whitespace from stored CSP headers. (Closed)
Patch Set: ASAN Created 4 years, 2 months 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 | « no previous file | third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
index 99a69abd80c5d91dbfa50940d6349e3128c9d305..8a75b0035175a2da7a08f846bad2f26b48bac2ae 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
@@ -809,7 +809,7 @@ bool CSPDirectiveList::shouldSendCSPHeader(Resource::Type type) const {
// directive-list = [ directive *( ";" [ directive ] ) ]
//
void CSPDirectiveList::parse(const UChar* begin, const UChar* end) {
- m_header = String(begin, end - begin);
+ m_header = String(begin, end - begin).stripWhiteSpace();
if (begin == end)
return;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698