New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ldapauth-fork

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldapauth-fork - npm Package Compare versions

Comparing version 2.2.14 to 2.2.15

4

CHANGES.md
# node-ldapauth-fork Changelog
## 2.2.15
- [issue #5] Handle missing bcrypt and throw a explanatory exception instead
## 2.2.14

@@ -4,0 +8,0 @@

20

lib/ldapauth.js

@@ -19,5 +19,5 @@ /**

var format = require('util').format;
var bcrypt;
/**

@@ -106,4 +106,16 @@ * Create an LDAP auth class. Primary usage is the `.authenticate` method.

if (opts.cache) {
var bcrypt = require('bcrypt');
this._salt = bcrypt.genSaltSync();
try {
bcrypt = require('bcrypt');
this._salt = bcrypt.genSaltSync();
} catch (ex) {
if (ex.code === 'MODULE_NOT_FOUND') {
throw(new Error(
ex.message +
'. Cache requires bcrypt. Either install bcrypt succesfully or do not ' +
'enable cache. If bcrypt installation failed you are likely using ' +
'Windows. If so, try running npm install ldapauth-fork --msvs_version=2012'));
} else {
throw(ex);
}
}
}

@@ -215,3 +227,2 @@ }

var cached = self.userCache.get(username);
var bcrypt = require('bcrypt');
if (cached && bcrypt.compareSync(password, cached.password)) {

@@ -235,3 +246,2 @@ return callback(null, cached.user)

if (self.opts.cache) {
var bcrypt = require('bcrypt');
bcrypt.hash(password, self._salt, function (err, hash) {

@@ -238,0 +248,0 @@ self.userCache.set(username, {password: hash, user: user});

{
"name": "ldapauth-fork",
"version": "2.2.14",
"version": "2.2.15",
"main": "./lib/ldapauth.js",

@@ -5,0 +5,0 @@ "description": "Authenticate against an LDAP server",

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