@snyk/docker-registry-v2-client
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -128,3 +128,4 @@ "use strict"; | ||
} | ||
config.uri = location; | ||
const redirectUrl = assertFullUrl(location, config.uri); | ||
config.uri = redirectUrl; | ||
return await needle_1.needleWrapper(config); | ||
@@ -178,2 +179,14 @@ } | ||
} | ||
function assertFullUrl(redirectLocation, originalLocation) { | ||
let redirectUrl; | ||
try { | ||
redirectUrl = new URL(redirectLocation); | ||
} | ||
catch (_a) { | ||
// in case the location is not a proper URL (contains just the path), attach the original URL's origin | ||
const originalUrl = new URL(originalLocation); | ||
redirectUrl = new URL(redirectLocation, originalUrl.origin); | ||
} | ||
return redirectUrl.href; | ||
} | ||
//# sourceMappingURL=registry-call.js.map |
@@ -45,3 +45,3 @@ { | ||
}, | ||
"version": "2.2.2" | ||
"version": "2.2.3" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46620
571