You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When extracting a registry-resolved package, the spec we hand to pacote is name@URL.
846
846
// pacote re-parses that with npa and gets spec.type === 'remote', so without an override the allow-remote gate would fire on every registry tarball (both =none and =root mis-fire).
847
-
// Returns true only when we are confident this is a registry-mediated install: the node's inbound edges must all be registry-typed (no exotic spec smuggled the URL in) AND the resolved URL's host must match the registry npm-registry-fetch selected for this spec, so a tampered lockfile pointing at an attacker host still hits the gate.
847
+
// Returns true only when we are confident this is a registry-mediated install.
848
848
#isRegistryResolvedTarball (node){
849
849
if(!node.resolved||!node.isRegistryDependency){
850
850
returnfalse
851
851
}
852
852
try{
853
-
// Hostnames are case-insensitive; lowercase both sides for safety even though WHATWG URL already normalizes.
0 commit comments