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

Unified Diff: extensions/common/extension_messages.cc

Issue 2957233002: Fix parsing of effective TLD wildcarding across IPC. (Closed)
Patch Set: 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..e273c39398d9ae413f12c12ccd138dd7908e95c8 100644
--- a/extensions/common/extension_messages.cc
+++ b/extensions/common/extension_messages.cc
@@ -139,8 +139,11 @@ bool ParamTraits<URLPattern>::Read(const base::Pickle* m,
// match the invalid patterns. We get around this by setting the valid
// schemes after parsing the pattern. Update these method calls once we can
// ignore scheme validation with URLPattern parse options. crbug.com/90544
+ // Allow effective TLD wildcarding since this check is only needed on initial
lazyboy 2017/06/30 20:43:22 nit: move this comment to next line as this is tal
nrpeter 2017/06/30 21:22:15 Done.
+ // creation of URLPattern and not as part of serialization.
lazyboy 2017/06/30 20:43:22 nit: this is deserialization, rather than serializ
nrpeter 2017/06/30 21:22:15 Done.
p->SetValidSchemes(URLPattern::SCHEME_ALL);
- URLPattern::ParseResult result = p->Parse(spec);
+ URLPattern::ParseResult result =
+ p->Parse(spec, URLPattern::ALLOW_WILDCARD_FOR_EFFECTIVE_TLD);
p->SetValidSchemes(valid_schemes);
return URLPattern::PARSE_SUCCESS == result;
}

Powered by Google App Engine
This is Rietveld 408576698