Skip to content

Commit 8a16594

Browse files
committed
Add adyenpayments to allowlist
1 parent 669a6c9 commit 8a16594

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/__tests__/httpURLConnectionClient.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe("HttpURLConnectionClient", () => {
1313
"https://sub.adyen.com",
1414
"http://another.adyen.com/a/b/c?q=1",
1515
"https://checkout-test.adyen.com",
16+
"https://custom-url.adyenpayments.com",
1617
])("should return true for valid adyen.com domain: %s", (location) => {
1718
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1819
// @ts-ignore - testing a private method

src/httpClient/httpURLConnectionClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ class HttpURLConnectionClient implements ClientInterface {
279279
private verifyLocation(location: string): boolean {
280280
try {
281281
const url = new URL(location);
282-
// allow-list of trusted domains (*.adyen.com)
283-
const allowedHostnameRegex = /\.adyen\.com$/i;
282+
// allow-list of trusted domains (*.adyen.com, *.adyenpayments.com)
283+
const allowedHostnameRegex = /(\.adyen\.com|\.adyenpayments\.com)$/i;
284284
return allowedHostnameRegex.test(url.hostname);
285285
} catch (e) {
286286
return false;

0 commit comments

Comments
 (0)