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

Unified Diff: extensions/common/extension_messages.cc

Issue 2957233002: Fix parsing of effective TLD wildcarding across IPC. (Closed)
Patch Set: Fix nits Created 3 years, 6 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
Index: extensions/common/extension_messages.cc
diff --git a/extensions/common/extension_messages.cc b/extensions/common/extension_messages.cc
index c7d25b7696d082b9d97f22999d55eca54ba7a10a..fcc34a2798bf406371871ded20a292b9102fbdb7 100644
--- a/extensions/common/extension_messages.cc
+++ b/extensions/common/extension_messages.cc
@@ -140,7 +140,10 @@ bool ParamTraits<URLPattern>::Read(const base::Pickle* m,
// schemes after parsing the pattern. Update these method calls once we can
// ignore scheme validation with URLPattern parse options. crbug.com/90544
p->SetValidSchemes(URLPattern::SCHEME_ALL);
- URLPattern::ParseResult result = p->Parse(spec);
+ // Allow effective TLD wildcarding since this check is only needed on initial
+ // creation of URLPattern and not as part of deserialization.
+ URLPattern::ParseResult result =
+ p->Parse(spec, URLPattern::ALLOW_WILDCARD_FOR_EFFECTIVE_TLD);
p->SetValidSchemes(valid_schemes);
return URLPattern::PARSE_SUCCESS == result;
}
« no previous file with comments | « chrome/browser/extensions/content_script_apitest.cc ('k') | extensions/common/extension_messages_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698