
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
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.
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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.