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

ldap-escape

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldap-escape - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

13

index.js
'use strict';
var _ = require('lodash');
var fmtr = require('fmtr');

@@ -42,8 +43,4 @@ var replacements = {

filter: function escapeFilter(format, unsafe) {
var formatter = _.template(format, {
interpolate: /\$\{([^\}]+)\}/gm
});
function escapeFilterClosure(unsafe) {
return formatter(_.transform(unsafe, function doEscape(safe, val, key) {
return fmtr(format, _.transform(unsafe, function doEscape(safe, val, key) {
safe[key] = ('' + val).replace(/(\u0000|\u0028|\u0029|\u002a|\u005c)/gm, function doReplace(str) {

@@ -59,8 +56,4 @@ return replacements.filter[str];

dn: function escapeDn(format, unsafe) {
var formatter = _.template(format, {
interpolate: /\$\{([^\}]+)\}/gm
});
function escapeDnClosure(unsafe) {
return formatter(_.transform(unsafe, function doEscape(safe, val, key) {
return fmtr(format, _.transform(unsafe, function doEscape(safe, val, key) {
safe[key] = ('' + val).replace(/(\u0022|\u0023|\u002b|\u002c|\u003b|\u003c|\u003d|\u003e|\u005c)/gm, function doReplace(str) {

@@ -67,0 +60,0 @@ return replacements.dn[str];

{
"name": "ldap-escape",
"version": "1.0.1",
"version": "1.1.0",
"description": "Escape functions for LDAP filters and distinguished names to prevent LDAP injection attacks.",

@@ -29,3 +29,4 @@ "main": "index.js",

"dependencies": {
"lodash": "^3.10.1"
"lodash": "^3.10.1",
"fmtr": "^1.0.0"
},

@@ -35,3 +36,3 @@ "devDependencies": {

"jshint": "^2.8.0",
"mocha": "^2.3.3"
"mocha": "^2.3.4"
},

@@ -38,0 +39,0 @@ "jshintConfig": {

@@ -76,3 +76,3 @@ # ldap-escape

uid: 42,
cn: 'alice',
cn: 'bob',
};

@@ -79,0 +79,0 @@

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