kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
735 stars 252 forks source link

[bug-fix] + added directive for number of LDAP configs #155

Closed vamitrou closed 7 years ago

vamitrou commented 7 years ago

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.

Any comments are welcome.