freman / caddy-reauth

Auth your Caddyserver requests against another server
MIT License
27 stars 15 forks source link

LDAP authentication crash #18

Closed jbq closed 6 years ago

jbq commented 6 years ago

Using the LDAP backend on one proof-of-concept HTTP request works, but as soon as I protect a real-world web application with multiple resources accessed at the same time, there is crash:

04/Jul/2018:16:37:09 +0000 [ERROR 500 /lib/jquery-2.2.4.min.js] bind with "uid=jbq,ou=Users,o=xxx,dc=jumpcloud,dc=com": unable to read LDAP response packet: unexpected EOF
172.18.0.2 - - [04/Jul/2018:16:37:09 +0000] "GET /lib/jquery-2.2.4.min.js HTTP/1.1" 500 26
04/Jul/2018:16:37:09 +0000 [PANIC /css/bootstrap-toggle-2.2.2.min.css] /go/src/gopkg.in/ldap.v2/conn.go:172 - runtime error: invalid memory address or nil pointer dereference
172.18.0.2 - - [04/Jul/2018:16:37:09 +0000] "GET /css/bootstrap-toggle-2.2.2.min.css HTTP/1.1" 500 26

Looks like the LDAP backend is not able to handle multiple requests at the same time.