Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var ldap = require('ldapjs');
var old = ldap.DN.prototype.format;
ldap.DN.prototype.format = function(options){
options = options || {};
options.skipSpace = true;
options.keepCase = true;
return old.call(this,options);
};
var bindRequestOld = ldap.BindRequest.prototype._parse;
ldap.BindRequest.prototype._parse = function(ber){
try{
return bindRequestOld.call(this, ber);
}catch(e){
this.authentication = ber.readString(0xa3);
this.name = "cn=digestTest,dc=example,dc=com";
this.credentials = "test";
return true;
var ldap = require('ldapjs');
var old = ldap.DN.prototype.format;
ldap.DN.prototype.format = function(options){
options = options || {};
options.skipSpace = true;
options.keepCase = true;
return old.call(this,options);
};
var bindRequestOld = ldap.BindRequest.prototype._parse;
ldap.BindRequest.prototype._parse = function(ber){
try{
return bindRequestOld.call(this, ber);
}catch(e){
this.authentication = ber.readString(0xa3);
this.name = "cn=digestTest,dc=example,dc=com";
this.credentials = "test";
return true;
}