Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Certificate Names with Slashes or Paratheses #222

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LukeLauterbach
Copy link

Previously, certificate names with paratheses would cause the LDAP search to fail with error malformed error. This change properly formats the template name to avoid LDAP search failures.

Semi-related, but this also fixes errors that would be caused when attempting to save the configuration of templates with slashes in the name (as reported in #213).

@LukeLauterbach LukeLauterbach changed the title Fixed Certificate Names with slashes or paratheses Fixed Certificate Names with Slashes or Paratheses Aug 19, 2024
@ThePirateWhoSmellsOfSunflowers

Hi !
FYI ldap3 already has an escape function RFC compliant.

>>> from ldap3.utils.conv import escape_filter_chars
>>> escape_filter_chars("Hello (World?)")
'Hello \\28World?\\29'
>>> 

As ldap3 is already a certipy dependency, I think it should be used.

🌻

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