kvspb / nginx-auth-ldap

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

Fix #80 LDAP connection failures are silently swallowed #83

Closed jbq closed 9 years ago

jbq commented 9 years ago

The nginx-auth-ldap module uses cycle log to report errors, and the latter is harcoded to only show messages at level greater or equal to NGX_LOG_ERR. So using ngx_log_error(NGX_LOG_INFO) is a no-op at runtime and has no effect to report LDAP connection error messages, even if error_log is configured in debug mode as the latter is the context log, not used in the module's LDAP functions. Level NGX_LOG_INFO can only be seen when running Nginx in --test mode.

So this patch merely changes the log level used to report errors, and has been tested successfully on nginx 1.4.6.

Fixes issue #80