Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.