Socket
Socket
Sign inDemoInstall

@snyk/docker-registry-v2-client

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snyk/docker-registry-v2-client - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2

18

dist/registry-call.js

@@ -9,2 +9,3 @@ "use strict";

const MAX_RETRIES = 1;
const MAX_REDIRECTS = 5;
async function registryV2Call(registryBase, endpoint, accept, username, password, reqOptions = {}) {

@@ -167,3 +168,10 @@ const reqConfig = buildUnauthenticatedV2RequestConfig(registryBase, endpoint, accept, reqOptions);

}
// Handle redirect while following up to MAX_REDIRECTS
async function handleRedirect(err, config) {
return handleRedirectRec(err, config, MAX_REDIRECTS);
}
async function handleRedirectRec(err, config, maxRedirects = 0) {
if (maxRedirects === 0) {
throw err;
}
// ACR does not handle redirects well, where automatic redirects

@@ -184,3 +192,11 @@ // fail due to an unexpected authorization header.

config.uri = redirectUrl;
return await needle_1.needleWrapper(config, MAX_RETRIES);
try {
return await needle_1.needleWrapper(config, MAX_RETRIES);
}
catch (err) {
if (isRedirectStatus(err.statusCode)) {
return await handleRedirectRec(err, config, maxRedirects - 1);
}
throw err;
}
}

@@ -187,0 +203,0 @@ /*

2

package.json

@@ -45,3 +45,3 @@ {

},
"version": "2.7.1"
"version": "2.7.2"
}

Sorry, the diff of this file is not supported yet

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