Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paypal/sdk-client

Package Overview
Dependencies
Maintainers
8
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paypal/sdk-client - npm Package Compare versions

Comparing version 4.0.65 to 4.0.66

2

package.json
{
"name": "@paypal/sdk-client",
"version": "4.0.65",
"version": "4.0.66",
"description": "Shared config between PayPal/Braintree.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,4 +21,2 @@ "use strict";

function validatePaymentsSDKUrl({
protocol,
hostname,
pathname,

@@ -28,12 +26,2 @@ query,

}) {
if (hostname === _constants.HOST.LOCALHOST) {
if (protocol !== _constants.PROTOCOL.HTTP && protocol !== _constants.PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${_constants.PROTOCOL.HTTP} or ${_constants.PROTOCOL.HTTPS} for host: ${hostname} - got ${protocol || 'undefined'}`);
}
} else {
if (protocol !== _constants.PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${_constants.PROTOCOL.HTTPS} for host: ${hostname} - got ${protocol || 'undefined'}`);
}
}
if (pathname !== _sdkConstants.SDK_PATH) {

@@ -113,2 +101,12 @@ throw new Error(`Invalid path for sdk url: ${pathname || 'undefined'}`);

if (hostname === _constants.HOST.LOCALHOST) {
if (protocol !== _constants.PROTOCOL.HTTP && protocol !== _constants.PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${_constants.PROTOCOL.HTTP} or ${_constants.PROTOCOL.HTTPS} for host: ${hostname} - got ${protocol || 'undefined'}`);
}
} else {
if (protocol !== _constants.PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${_constants.PROTOCOL.HTTPS} for host: ${hostname} - got ${protocol || 'undefined'}`);
}
}
if (isLegacySDKUrl(hostname, pathname)) {

@@ -115,0 +113,0 @@ validateLegacySDKUrl({

@@ -17,13 +17,3 @@ /* @flow */

function validatePaymentsSDKUrl({ protocol, hostname, pathname, query, hash }) {
if (hostname === HOST.LOCALHOST) {
if (protocol !== PROTOCOL.HTTP && protocol !== PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${ PROTOCOL.HTTP } or ${ PROTOCOL.HTTPS } for host: ${ hostname } - got ${ protocol || 'undefined' }`);
}
} else {
if (protocol !== PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${ PROTOCOL.HTTPS } for host: ${ hostname } - got ${ protocol || 'undefined' }`);
}
}
function validatePaymentsSDKUrl({ pathname, query, hash }) {

@@ -98,2 +88,12 @@ if (pathname !== SDK_PATH) {

if (hostname === HOST.LOCALHOST) {
if (protocol !== PROTOCOL.HTTP && protocol !== PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${ PROTOCOL.HTTP } or ${ PROTOCOL.HTTPS } for host: ${ hostname } - got ${ protocol || 'undefined' }`);
}
} else {
if (protocol !== PROTOCOL.HTTPS) {
throw new Error(`Expected protocol for sdk url to be ${ PROTOCOL.HTTPS } for host: ${ hostname } - got ${ protocol || 'undefined' }`);
}
}
if (isLegacySDKUrl(hostname, pathname)) {

@@ -100,0 +100,0 @@ validateLegacySDKUrl({ pathname });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc