
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ldap-escape
Advanced tools
Escape functions for LDAP filters and distinguished names to prevent LDAP injection attacks.
Template literal tag functions for LDAP filters and distinguished names to prevent LDAP injection attacks. Uses the escape codes from Active Directory: Characters to Escape.
npm install --save ldap-escape
Character | Escape |
---|---|
* | \2A |
( | \28 |
) | \29 |
\ | \5C |
NUL | \00 |
Character | Escape |
---|---|
, | \, |
\ | \\ |
# | \# |
+ | \+ |
< | \< |
> | \> |
; | \; |
" | \" |
= | \= |
SPC (leading or trailing) | \ |
Escapes input for use as an LDAP filter.
Escapes input for use as an LDAP distinguished name.
"use strict";
const ldapEscape = require('ldap-escape');
const uid = 1337;
console.log(ldapEscape.filter`uid=${uid}`); // -> 'uid=1337'
"use strict";
const ldapEscape = require('ldap-escape');
const cn = 'alice';
console.log(ldapEscape.dn`cn=${cn},dc=test`); // -> 'cn=alice,dc=test'
npm test
See LICENSE.md
FAQs
Escape functions for LDAP filters and distinguished names to prevent LDAP injection attacks.
The npm package ldap-escape receives a total of 5,464 weekly downloads. As such, ldap-escape popularity was classified as popular.
We found that ldap-escape demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.