Index: chrome/common/content_settings_pattern.cc |
diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc |
index 98ac6d637e2e52cae9ba9d582122e3d724e53dd6..93113ad6797c58f7d5ebc3b0e402671058c2cbdb 100644 |
--- a/chrome/common/content_settings_pattern.cc |
+++ b/chrome/common/content_settings_pattern.cc |
@@ -174,6 +174,13 @@ bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) { |
// Canonicalize the host part. |
const std::string host(parts->host); |
+ if (host.size() >= 2 && |
+ host[host.size() - 1] == '.' && |
markusheintz_
2013/04/02 19:16:46
What about a..a?
Please move this logic to the ch
yhirano
2013/04/02 19:54:54
Done.
|
+ host[host.size() - 2] == '.') { |
+ // There are multiple ending dots. |
+ return false; |
+ } |
+ |
url_canon::CanonHostInfo host_info; |
std::string canonicalized_host(net::CanonicalizeHost(host, &host_info)); |
if (host_info.IsIPAddress() && parts->has_domain_wildcard) |