mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
don't show ldap error when empty form is submitted
git-svn-id: http://www.observium.org/svn/observer/trunk@3067 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -2,19 +2,21 @@
|
|||||||
|
|
||||||
$ds = @ldap_connect($config['auth_ldap_server'],$config['auth_ldap_port']);
|
$ds = @ldap_connect($config['auth_ldap_server'],$config['auth_ldap_port']);
|
||||||
|
|
||||||
if ($config['auth_ldap_starttls'] && ($config['auth_ldap_starttls'] == 'optional' || $config['auth_ldap_starttls'] == 'require')) {
|
if ($config['auth_ldap_starttls'] && ($config['auth_ldap_starttls'] == 'optional' || $config['auth_ldap_starttls'] == 'require'))
|
||||||
$tls = ldap_start_tls($ds);
|
{
|
||||||
if ($config['auth_ldap_starttls'] == 'require' && $tls == FALSE) {
|
$tls = ldap_start_tls($ds);
|
||||||
echo("<h2>Fatal error: LDAP TLS required but not successfully negotiated:" . ldap_error($ds) . "</h2>");
|
if ($config['auth_ldap_starttls'] == 'require' && $tls == FALSE)
|
||||||
exit;
|
{
|
||||||
}
|
echo("<h2>Fatal error: LDAP TLS required but not successfully negotiated:" . ldap_error($ds) . "</h2>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function authenticate($username,$password)
|
function authenticate($username,$password)
|
||||||
{
|
{
|
||||||
global $config, $ds;
|
global $config, $ds;
|
||||||
|
|
||||||
if ($ds)
|
if ($username && $ds)
|
||||||
{
|
{
|
||||||
if ($config['auth_ldap_version'])
|
if ($config['auth_ldap_version'])
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user