Index: net/http/http_security_headers.cc |
diff --git a/net/http/http_security_headers.cc b/net/http/http_security_headers.cc |
index 9fc7627cc5e0c676c3461ad4a8340145d5d00ca3..0c3305f6e42731711cd3f77d0f2162e79a571fd6 100644 |
--- a/net/http/http_security_headers.cc |
+++ b/net/http/http_security_headers.cc |
@@ -325,7 +325,18 @@ bool ParseHPKPHeader(const std::string& value, |
*include_subdomains = include_subdomains_candidate; |
for (HashValueVector::const_iterator i = pins.begin(); |
i != pins.end(); ++i) { |
- hashes->push_back(*i); |
+ bool found = false; |
+ |
+ for (HashValueVector::const_iterator j = hashes->begin(); |
+ j != hashes->end(); ++j) { |
+ if (j->Equals(*i)) { |
+ found = true; |
+ break; |
+ } |
+ } |
+ |
+ if (!found) |
+ hashes->push_back(*i); |
} |
return true; |