cnf->servers buffer was allocating a static size of 7*sizeof(ngx_http_auth_ldap_server_t) and this was giving us a buffer overflow due to larger number of ldap_server directives.
The code now offers the auth_ldap_servers_size main configuration directive that allows you to specify the size of your servers buffer. By default it is using the NGX_HTTP_AUTH_LDAP_MAX_SERVERS_SIZE constant which equals to 7.
cnf->servers
buffer was allocating a static size of7*sizeof(ngx_http_auth_ldap_server_t)
and this was giving us a buffer overflow due to larger number ofldap_server
directives.The code now offers the
auth_ldap_servers_size
main configuration directive that allows you to specify the size of your servers buffer. By default it is using theNGX_HTTP_AUTH_LDAP_MAX_SERVERS_SIZE
constant which equals to7
.Any comments are welcome.