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

npm-registry-client

Package Overview
Dependencies
Maintainers
2
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-registry-client - npm Package Compare versions

Comparing version 3.1.5 to 3.1.6

22

lib/request.js

@@ -44,9 +44,13 @@ var assert = require("assert")

var adduserChange = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)\/-rev/
, uc = where.match(adduserChange)
, isUserChange = where.match(adduserChange)
, adduserNew = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)/
, nu = where.match(adduserNew)
, isNewUser = where.match(adduserNew)
, alwaysAuth = this.conf.get("always-auth")
, isDel = method === "DELETE"
, isWrite = what || isDel
, isDelete = method === "DELETE"
, isWrite = what || isDelete
if (isUserChange && !isWrite) {
return cb(new Error("trying to change user document without writing(?!)"))
}
// resolve to a full url on the registry

@@ -77,3 +81,11 @@ if (!where.match(/^https?:\/\//)) {

var authed = (alwaysAuth || isWrite) && !nu || uc || isDel
// most of the time we don't want to auth
var authed = false
// new users can *not* use auth, because they don't *have* auth yet
if (isNewUser) {
authed = false
}
else if (alwaysAuth || isWrite) {
authed = true
}
if (!authed) this.log.verbose("request", "no auth needed")

@@ -80,0 +92,0 @@

@@ -5,3 +5,3 @@ {

"description": "Client for the npm registry",
"version": "3.1.5",
"version": "3.1.6",
"repository": {

@@ -8,0 +8,0 @@ "url": "git://github.com/isaacs/npm-registry-client"

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