Repository navigation
Fix: Ensure ldapEmailField is formatted as a JSON array - #484
Conversation
ostefano
left a comment
There was a problem hiding this comment.
This is wrong. the field is APACHESECUREAUTH_LDAP_EMAIL_FIELD but you are using the LDAPAUTH_LDAPEMAILFIELD env var.
|
@TrinityBerserker please address concerns otherwise I will be closing this. |
|
Hi @ostefano, sorry for the delay. I've just pushed the fix: removed the trailing comma (since it's the last element in the JSON object) and fixed the leading whitespace to match the indentation of the surrounding lines. The changes are up now, let me know if it looks good! |
|
The leading whitespace is still there. |
|
Hi @ostefano and @righel, I apologize for the delay and for the runaround. I did a deep check and realized I had mixed up the variables and formatting between the Apache and LDAP blocks in my previous commits. I've just pushed a clean fix:
All checks are passing and it's ready for review. Let me know if this looks good to merge. Thanks for your patience! |
This PR fixes the JSON generation for ldapEmailField in configure_misp.sh. The value was being processed as a raw string, but the LdapAuth plugin expects an array. The fix wraps the value in brackets and quotes to ensure a valid JSON array is generated.
Verification:
I tested this locally by running the Docker setup with LDAPAUTH_ENABLE=true and LDAPAUTH_LDAPEMAILFIELD="mail". The previous error Provided new config is not array, NULL given no longer appears in the logs, and the configuration is generated correctly.
Fixes #287