anvilresearch / connect

A modern authorization server built to authenticate your users and protect your APIs
http://anvil.io
MIT License
361 stars 86 forks source link

Server crashes if DNS lookup fails during AD/LDAP authentication request #283

Open adalinesimonian opened 8 years ago

adalinesimonian commented 8 years ago

If DNS resolution of the AD/LDAP server name fails during an authentication request, the server crashes.

To replicate:

  1. Configure an AD/LDAP provider with an invalid hostname
  2. Try signing in using the provider

This seems related to https://github.com/vsimonian/node-adauth/issues/1 which itself is directly a result of https://github.com/vesse/node-ldapauth-fork/pull/20

My guess is that this may be temp-fixed by a try-catch block in the right place.