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

Fix/advanced ldap filters #252

Merged
merged 13 commits into from
Jan 4, 2024
Merged

Fix/advanced ldap filters #252

merged 13 commits into from
Jan 4, 2024

Conversation

mkayontour
Copy link
Member

Changed template filter had double quoting active.

Example:

"{{ value | quote }}" 

Gives output like this:

"'test'"

In addition I'll make sure any string starting with "!" will be quoted. Otherwise only filters with "=" get quoted. Don't know if this is a thing.

Fixes #208

@cla-bot cla-bot bot added the cla/signed label Jan 3, 2024
@mkayontour mkayontour self-assigned this Jan 3, 2024
@mkayontour mkayontour added the bug Something isn't working label Jan 3, 2024
@mkayontour mkayontour merged commit b93d146 into main Jan 4, 2024
1 check passed
@mocdaniel mocdaniel deleted the fix/advanced_ldap_filters branch January 7, 2024 17:00
@pc2306
Copy link

pc2306 commented Jan 30, 2024

Unfortunately this still didn't work for me. I had problems with LDAP complaining about wrong credentials or filters. It seems that Icinga doesn't like single quotes at some places and passwords with special characters that are not double quoted.

I have changed lines 10 and 11 in ini_template.j2 as follows:

{% elif value is string %}
{{ option }} = "{{ value }}"

and now everything works fine.

Best Regards and thanks for the great work
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ini_template is not working for advanced ldap filters.
2 participants