Skip to content

Commit

Permalink
Merge pull request #3276 from brave/sandbox_uphold_exception
Browse files Browse the repository at this point in the history
Issue 5800: Add a fingerprint exception for sandbox.uphold.com
  • Loading branch information
bsclifton authored Aug 28, 2019
2 parents e37c2a1 + 06b2551 commit d18e225
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/shield_exceptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ bool IsWhitelistedFingerprintingException(const GURL& firstPartyOrigin,
GURL("https://uphold.com/"),
std::vector<URLPattern>({URLPattern(URLPattern::SCHEME_ALL,
"https://uphold.netverify.com/*")})
},
{
GURL("https://sandbox.uphold.com/"),
std::vector<URLPattern>({URLPattern(URLPattern::SCHEME_ALL,
"https://netverify.com/*")})
}
};
std::map<GURL, std::vector<URLPattern> >::iterator i =
Expand Down
23 changes: 23 additions & 0 deletions common/shield_exceptions_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ TEST_F(BraveShieldsExceptionsTest, IsWhitelistedFingerprintingException) {
EXPECT_FALSE(IsWhitelistedFingerprintingException(
GURL("https://www.uphold.com/"),
GURL("https://uphold.netverify.com/iframe")));

// Tests for sandbox URLs
EXPECT_TRUE(IsWhitelistedFingerprintingException(
GURL("https://sandbox.uphold.com"),
GURL("https://netverify.com/iframe")));
EXPECT_TRUE(IsWhitelistedFingerprintingException(
GURL("https://sandbox.uphold.com/"),
GURL("https://netverify.com")));
EXPECT_FALSE(IsWhitelistedFingerprintingException(
GURL("http://sandbox.uphold.com/"),
GURL("https://uphold.netverify.com/")));
EXPECT_FALSE(IsWhitelistedFingerprintingException(
GURL("https://sandbox.uphold.com/"),
GURL("http://netverify.com/")));
EXPECT_FALSE(IsWhitelistedFingerprintingException(
GURL("https://netverify.com/iframe"),
GURL("https://sandbox.uphold.com/")));
EXPECT_FALSE(IsWhitelistedFingerprintingException(
GURL("https://sandbox.uphold.com/"),
GURL("https://uphold.netverify.com/iframe")));
EXPECT_FALSE(IsWhitelistedFingerprintingException(
GURL("https://www.sandbox.uphold.com/"),
GURL("https://netverify.com/iframe")));
}

} // namespace

0 comments on commit d18e225

Please sign in to comment.