paypal-checkout
Advanced tools
Comparing version
{ | ||
"name": "paypal-checkout", | ||
"version": "4.0.341", | ||
"version": "4.0.342", | ||
"description": "PayPal Checkout components, for integrating checkout products.", | ||
@@ -25,3 +25,2 @@ "main": "index.js", | ||
"postversion": "./scripts/postversion.sh", | ||
"cdnify": "grabthar-cdnify --cdn=https://www.paypalobjects.com --deployonly", | ||
"clean": "rimraf dist coverage", | ||
@@ -28,0 +27,0 @@ "reinstall": "rimraf flow-typed && rimraf node_modules && npm install && flow-typed install", |
@@ -9,3 +9,3 @@ /* @flow */ | ||
import { config } from '../config'; | ||
import { config, paypalDomainRegex } from '../config'; | ||
import { FPTI, PAYMENT_TYPE } from '../constants'; | ||
@@ -405,3 +405,3 @@ import { request, memoize, isPayPalDomain, uniqueID } from '../lib'; | ||
on(PROXY_REST, { domain: config.paypal_domain_regex }, ({ data }) => { | ||
on(PROXY_REST, { domain: paypalDomainRegex }, ({ data }) => { | ||
proxyRest = data; | ||
@@ -408,0 +408,0 @@ }); |
@@ -30,2 +30,5 @@ /* @flow weak */ | ||
// eslint-disable-next-line security/detect-unsafe-regex | ||
export const paypalDomainRegex = /^(https?|mock):\/\/[a-zA-Z0-9_.-]+\.paypal\.com(:\d+)?$/; | ||
export const config = { | ||
@@ -39,4 +42,5 @@ | ||
// eslint-disable-next-line security/detect-unsafe-regex | ||
paypal_domain_regex: /^(https?|mock):\/\/[a-zA-Z0-9_.-]+\.paypal\.com(:\d+)?$/, | ||
get paypal_domain_regex() : RegExp { | ||
return paypalDomainRegex; | ||
}, | ||
@@ -60,7 +64,7 @@ version: __PAYPAL_CHECKOUT__.__MINOR_VERSION__, | ||
get stageUrl() : string { | ||
return `www.${ config.stage }.${ config.stageDomain }`; | ||
return `www.msmaster.qa.paypal.com`; | ||
}, | ||
get apiStageUrl() : string { | ||
return `www.${ config.apiStage }.${ config.stageDomain }`; | ||
return `www.msmaster.qa.paypal.com`; | ||
}, | ||
@@ -728,3 +732,3 @@ | ||
get apiStage() : string { | ||
return config._apiStage || config.stage; | ||
return config._apiStage || 'msmaster'; | ||
}, | ||
@@ -1046,3 +1050,3 @@ | ||
[ ENV.LOCAL ]: `${ paypalUrls.local }${ config.postBridgeUri }&env=local`, | ||
[ ENV.STAGE ]: `${ paypalUrls.stage }${ config.postBridgeUri }&env=stage&stage=${ config.stage }`, | ||
[ ENV.STAGE ]: `${ paypalUrls.stage }${ config.postBridgeUri }&env=stage&stage=msmaster`, | ||
[ ENV.SANDBOX ]: `${ paypalUrls.sandbox }${ config.postBridgeUri }&env=sandbox`, | ||
@@ -1049,0 +1053,0 @@ [ ENV.PRODUCTION ]: `${ paypalUrls.production }${ config.postBridgeUri }&env=production`, |
@@ -6,3 +6,3 @@ /* @flow */ | ||
import { config } from '../config'; | ||
import { config, paypalDomainRegex } from '../config'; | ||
@@ -24,3 +24,3 @@ import { noop } from './util'; | ||
on(`proxy_${ name }`, { domain: config.paypal_domain_regex }, ({ data }) => { | ||
on(`proxy_${ name }`, { domain: paypalDomainRegex }, ({ data }) => { | ||
methods.push(data.originalMethod); | ||
@@ -27,0 +27,0 @@ }); |
@@ -6,3 +6,3 @@ /* @flow */ | ||
import { config } from '../config'; | ||
import { paypalDomainRegex } from '../config'; | ||
@@ -32,5 +32,4 @@ export function allowIframe() : boolean { | ||
export function isPayPalDomain() : boolean { | ||
return Boolean(`${ window.location.protocol }//${ window.location.host }`.match(config.paypal_domain_regex)) || window.mockDomain === 'mock://www.paypal.com'; | ||
return Boolean(`${ window.location.protocol }//${ window.location.host }`.match(paypalDomainRegex)) || window.mockDomain === 'mock://www.paypal.com'; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
-100%3821829
-0.01%58422
0