Open
Description
Describe the bug
If you test an AD source and DNS resolution doesn't work inside pfperl-api
container, you got a message like this:
Can't connect to server or bind with '[email protected]' on :389
Related code:
To Reproduce
Steps to reproduce the behavior:
- Configure an AD source with host equals to a FQDN (not an IP) which is not resolvable by
pfperl-api
container - Click on Test button inside AD source
=> You received a message from API but you don't know that DNS resolution failed
Expected behavior
API must return a message to explain that DNS resolution has failed.
Additional context
The API already handles this error because we can see this message in packetfence.log
:
Jun 1 06:53:13 pfel8dev pfperl-api-docker-wrapper[14153]: pfperl-api(14) ERROR: [mac:[undef]] Unable to resolve ad.example.lan (pf::util::resolve)
I think there is a missing check here to ensure we don't add undefined value in @LDAPServers
packetfence/lib/pf/Authentication/Source/LDAPSource.pm
Lines 240 to 241 in e529279
Activity