@cepharum/ldap-bridge
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "@cepharum/ldap-bridge", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "remotely backed LDAP authentication", | ||
@@ -5,0 +5,0 @@ "main": "server/index.js", |
@@ -88,3 +88,3 @@ /** | ||
key: options.key, | ||
cert: options.cert, | ||
certificate: options.cert, | ||
} ); | ||
@@ -439,7 +439,17 @@ | ||
if ( !peers || !peers.length ) { | ||
debug( "empty list of accepted peers -> accepting all" ); | ||
return Promise.resolve( true ); | ||
} | ||
return DNS.reverse( req.connection.remoteAddress ) | ||
.then( ( [name] ) => name && peers.some( peer => peer === name ) ); | ||
const ip = req.connection.remoteAddress; | ||
return DNS.reverse( ip ) | ||
.then( ( [name] ) => { | ||
const isListed = name && peers.some( peer => peer === name ); | ||
debug( `peer ${ip} is ${name} which is ${isListed ? "" : "not "}listed -> ${isListed ? "accept" : "reject"}` ); | ||
return isListed; | ||
} ); | ||
} | ||
@@ -446,0 +456,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47163
875