Skip to content

Fixed Certificate Names with Slashes or Paratheses#222

Closed
LukeLauterbach wants to merge 1 commit intoly4k:mainfrom
LukeLauterbach:main
Closed

Fixed Certificate Names with Slashes or Paratheses#222
LukeLauterbach wants to merge 1 commit intoly4k:mainfrom
LukeLauterbach:main

Conversation

@LukeLauterbach
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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.

🌻

ly4k added a commit that referenced this pull request May 11, 2025
@ly4k ly4k closed this May 15, 2025
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.

3 participants