Skip to content

Implement proper input sanitization to prevent LDAP injection attacks#153

Merged
joshuaboniface merged 1 commit into
jellyfin:masterfrom
tam1m:sanitize-ldap-input
Dec 4, 2023
Merged

Implement proper input sanitization to prevent LDAP injection attacks#153
joshuaboniface merged 1 commit into
jellyfin:masterfrom
tam1m:sanitize-ldap-input

Conversation

@tam1m

@tam1m tam1m commented Dec 4, 2023

Copy link
Copy Markdown
Contributor

This patch sanitizes the username input by replacing unsafe characters with their ASCII HEX representation. This is necessary to counteract potential injections of malicious statements into the LDAP search query constructed by the plugin.

Table of unsafe characters and their replacements:

\	\\5c
*	\\2a
(	\\28
)	\\29
NUL	\\00

References:
https://datatracker.ietf.org/doc/html/rfc4515#section-3
https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html#search-filter-escaping

@joshuaboniface joshuaboniface merged commit 5b2b6d8 into jellyfin:master Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants