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.6 to 3.1.7

19

lib/request.js

@@ -45,3 +45,3 @@ var assert = require("assert")

, isUserChange = where.match(adduserChange)
, adduserNew = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)/
, adduserNew = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)$/
, isNewUser = where.match(adduserNew)

@@ -81,12 +81,21 @@ , alwaysAuth = this.conf.get("always-auth")

// most of the time we don't want to auth
var authed = false
var authed
// new users can *not* use auth, because they don't *have* auth yet
if (isNewUser) {
this.log.verbose("request", "new user, so can't send auth")
authed = false
}
else if (alwaysAuth || isWrite) {
else if (alwaysAuth) {
this.log.verbose("request", "always-auth set; sending authorization")
authed = true
}
if (!authed) this.log.verbose("request", "no auth needed")
else if (isWrite) {
this.log.verbose("request", "sending authorization for write operation")
authed = true
}
else {
// most of the time we don't want to auth
this.log.verbose("request", "no auth needed")
authed = false
}

@@ -93,0 +102,0 @@ var self = this

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

"description": "Client for the npm registry",
"version": "3.1.6",
"version": "3.1.7",
"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