We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6694684 commit 876f5ebCopy full SHA for 876f5eb
src/httpClient/httpURLConnectionClient.ts
@@ -181,6 +181,12 @@ class HttpURLConnectionClient implements ClientInterface {
181
try {
182
const url = new URL(location);
183
184
+ // allow-list of trusted domains (*.adyen.com)
185
+ const allowedHostnameRegex = /^([a-z0-9-]+\.)*adyen\.com$/;
186
+ if (!allowedHostnameRegex.test(url.hostname)) {
187
+ return reject(new Error(`Redirect to host ${url.hostname} is not allowed.`));
188
+ }
189
+
190
const newRequestOptions = {
191
hostname: url.hostname,
192
port: url.port || (url.protocol === 'https:' ? 443 : 80),
0 commit comments