From 2e285e1c7e808f72972362e724aa02ff20a7ad6c Mon Sep 17 00:00:00 2001 From: Cole Goldsmith Date: Tue, 26 Apr 2016 12:14:01 -0500 Subject: [PATCH] added extra error message and form button validation to LDAPProxy.php --- webadmin/var/www/webadmin/LDAPProxy.php | 27 ++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/webadmin/var/www/webadmin/LDAPProxy.php b/webadmin/var/www/webadmin/LDAPProxy.php index 10f7cf7..a053a00 100644 --- a/webadmin/var/www/webadmin/LDAPProxy.php +++ b/webadmin/var/www/webadmin/LDAPProxy.php @@ -8,13 +8,19 @@ include "inc/header.php"; +$proxies = $conf->getProxies(); + +if (isset($_POST['enableproxy']) && empty($proxies)) +{ + echo "
ERROR: Ensure you have added a LDAP Proxy specification
"; +} if (isset($_POST['disableproxy'])) { suExec("disableproxy"); } -if (isset($_POST['enableproxy'])) +if (isset($_POST['enableproxy']) && !empty($proxies)) { suExec("enableproxy"); } @@ -80,6 +86,25 @@ // #################################################################### ?> +

LDAP Proxy