Skip to content

fix: LDAP constants used in some LdapAuth settings are parsed as stri… - #436

Open
righel wants to merge 1 commit into
masterfrom
fix-ldap-consts-settings
Open

fix: LDAP constants used in some LdapAuth settings are parsed as stri…#436
righel wants to merge 1 commit into
masterfrom
fix-ldap-consts-settings

Conversation

@righel

@righel righel commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

…ngs silently failing to do what they are supposed to

Add a utility function to parse php constants and write the integer value in the MISP config.

Current settings in template.env:

LDAPAUTH_LDAPTLSREQUIRECERT="LDAP_OPT_X_TLS_ALLOW"
LDAPAUTH_LDAPTLSCRLCHECK="LDAP_OPT_X_TLS_CRL_PEER"
LDAPAUTH_LDAPTLSPROTOCOLMIN="LDAP_OPT_X_TLS_PROTOCOL_TLS1_2"

Produce:

'ldapTlsRequireCert' => 'LDAP_OPT_X_TLS_ALLOW',
'ldapTlsCrlCheck' => 'LDAP_OPT_X_TLS_CRL_PEER',
'ldapTlsProtocolMin' => 'LDAP_OPT_X_TLS_PROTOCOL_TLS1_2',

Instead of:

'ldapTlsRequireCert' => 3, // LDAP_OPT_X_TLS_ALLOW
'ldapTlsCrlCheck' => 1, // LDAP_OPT_X_TLS_CRL_PEER
'ldapTlsProtocolMin' => 771, // LDAP_OPT_X_TLS_PROTOCOL_TLS1_2

…ngs silently failing to do what they are supposed to
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.

1 participant