diff options
Diffstat (limited to 'chromium/services/network/public/cpp/is_potentially_trustworthy.cc')
-rw-r--r-- | chromium/services/network/public/cpp/is_potentially_trustworthy.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chromium/services/network/public/cpp/is_potentially_trustworthy.cc b/chromium/services/network/public/cpp/is_potentially_trustworthy.cc index 1d333c1f036..48a3edf1a20 100644 --- a/chromium/services/network/public/cpp/is_potentially_trustworthy.cc +++ b/chromium/services/network/public/cpp/is_potentially_trustworthy.cc @@ -115,6 +115,11 @@ bool IsValidWildcardPattern(const std::string& hostname_pattern) { // If there is no registrar portion, the pattern is considered invalid. if (registry_length == 0) return false; + // If the registrar portion contains a wildcard, the pattern is considered + // invalid. + if (hostname_pattern.find('*', hostname_pattern.size() - registry_length) != + std::string::npos) + return false; // If there is no component before the registrar portion, or if the component // immediately preceding the registrar portion contains a wildcard, the // pattern is not considered valid. |