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

Unified Diff: chrome/common/content_settings_pattern_parser.cc

Issue 13251012: Fix b180514: Some exception entries cannot be deleted from a setting panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring Created 7 years, 9 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 | chrome/common/content_settings_pattern_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/content_settings_pattern_parser.cc
diff --git a/chrome/common/content_settings_pattern_parser.cc b/chrome/common/content_settings_pattern_parser.cc
index 2f823cc61ce928266f879fb5bf19d8e1d8b788f6..f5542b5c9b2cd428037ea8193261821c856952eb 100644
--- a/chrome/common/content_settings_pattern_parser.cc
+++ b/chrome/common/content_settings_pattern_parser.cc
@@ -139,6 +139,11 @@ void PatternParser::Parse(const std::string& pattern_spec,
if (host_component.IsNonEmpty()) {
std::string host = pattern_spec.substr(host_component.start,
host_component.len);
+ if (host == "." || host.find("..") != std::string::npos) {
jochen (gone - plz use gerrit) 2013/04/03 09:12:36 sorry for being late to the party I would expect
markusheintz_ 2013/04/03 09:48:40 Do you have any particular checks do you have in m
yhirano 2013/04/03 09:59:10 Let me clarify. As you say, Builder::Validate() is
+ builder->Invalid();
+ return;
+ }
+
if (host == kHostWildcard) {
builder->WithDomainWildcard();
} else if (StartsWithASCII(host, kDomainWildcard, true)) {
« no previous file with comments | « no previous file | chrome/common/content_settings_pattern_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698