marshmallows
Advanced tools
Comparing version 0.1.1 to 1.0.0
'use strict'; | ||
const auth = require('basic-auth'); | ||
function processIsConfigured(proc) { | ||
return !!proc.env.NODE_ENV && | ||
proc.env.NODE_ENV !== 'development' && | ||
!!proc.env.USER && | ||
!!proc.env.PASS; | ||
} | ||
/** | ||
@@ -16,3 +23,3 @@ * auth | ||
function authHandler(req, res, next) { | ||
if (!!process.env.NODE_ENV && process.env.NODE_ENV !== 'development') { | ||
if (processIsConfigured(process)) { | ||
const user = auth(req); | ||
@@ -19,0 +26,0 @@ |
{ | ||
"name": "marshmallows", | ||
"version": "0.1.1", | ||
"version": "1.0.0", | ||
"description": "A drop-in Basic Auth middleware for Express", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1673
31
2
2
1