fix stuff that can be fixed

This commit is contained in:
Matvey Aksenov 2015-11-23 22:04:59 +00:00
parent 82b1769fc9
commit 990a1021b8
4 changed files with 43 additions and 34 deletions

View File

@ -3,9 +3,18 @@
var fs = require('fs'); var fs = require('fs');
var ldapjs = require('ldapjs'); var ldapjs = require('ldapjs');
// Stub unimplemented functionality.
ldapjs.ExtensibleFilter.prototype.matches = ldapjs.EqualityFilter.prototype.matches; ldapjs.ExtensibleFilter.prototype.matches = ldapjs.EqualityFilter.prototype.matches;
ldapjs.ApproximateFilter.prototype.matches = ldapjs.EqualityFilter.prototype.matches; ldapjs.ApproximateFilter.prototype.matches = ldapjs.EqualityFilter.prototype.matches;
// Remove superfluous spaces from DNs.
var wrappee = ldapjs.DN.prototype.format;
ldapjs.DN.prototype.format = function(options) {
options = options || this._format;
options['skipSpace'] = true;
return (wrappee.bind(this))(options);
};
var port = process.env.PORT; var port = process.env.PORT;
var certificate = fs.readFileSync(process.env.SSL_CERT, "utf-8"); var certificate = fs.readFileSync(process.env.SSL_CERT, "utf-8");
var key = fs.readFileSync(process.env.SSL_KEY, "utf-8"); var key = fs.readFileSync(process.env.SSL_KEY, "utf-8");