Commit abb42033 authored by Ad Schellevis's avatar Ad Schellevis

(legacy/ldap) more ldap fixes

parent 5c8014c1
...@@ -195,7 +195,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -195,7 +195,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if ($pconfig['type'] == "ldap") { if ($pconfig['type'] == "ldap") {
$reqdfields = explode(" ", "name type ldap_host ldap_port ". $reqdfields = explode(" ", "name type ldap_host ldap_port ".
"ldap_urltype ldap_protver ldap_scope ". "ldap_urltype ldap_protver ldap_scope ".
"ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers"); "ldap_attr_user ldapauthcontainers");
$reqdfieldsn = array( $reqdfieldsn = array(
gettext("Descriptive name"), gettext("Descriptive name"),
gettext("Type"), gettext("Type"),
...@@ -426,8 +426,7 @@ function select_clicked() { ...@@ -426,8 +426,7 @@ function select_clicked() {
if (document.getElementById("ldap_port").value == '' || if (document.getElementById("ldap_port").value == '' ||
document.getElementById("ldap_host").value == '' || document.getElementById("ldap_host").value == '' ||
document.getElementById("ldap_scope").value == '' || document.getElementById("ldap_scope").value == '' ||
document.getElementById("ldap_basedn").value == '' || document.getElementById("ldap_basedn").value == '' ) {
document.getElementById("ldapauthcontainers").value == '') {
alert("<?=gettext("Please fill the required values.");?>"); alert("<?=gettext("Please fill the required values.");?>");
return; return;
} }
...@@ -925,16 +924,16 @@ endif; ?> ...@@ -925,16 +924,16 @@ endif; ?>
if (document.getElementById("ldap_port").value == "") ldap_urlchange(); if (document.getElementById("ldap_port").value == "") ldap_urlchange();
<?php <?php
if ($pconfig['type'] == "ldap") { if ($pconfig['type'] == "ldap") {
echo ' ldap_bindchange();\n'; echo " ldap_bindchange();\n";
echo ' if (document.getElementById("ldap_port").value == "") ldap_urlchange();\n'; echo " if (document.getElementById(\"ldap_port\").value == \"\") ldap_urlchange();\n";
if (!isset($id)) { if (!isset($id)) {
echo ' ldap_tmplchange();\n'; echo " ldap_tmplchange();\n";
} }
} else { } else {
echo ' radius_srvcschange();\n'; echo " radius_srvcschange();\n";
} }
?> ?>
} });
//]]> //]]>
</script> </script>
......
...@@ -33,9 +33,11 @@ include('head.inc'); ...@@ -33,9 +33,11 @@ include('head.inc');
$ous = array(); $ous = array();
if (isset($_GET['basedn']) && isset($_GET['host'])) { if (isset($_GET['basedn']) && isset($_GET['host'])) {
$authcfg = array(); if (isset($_GET['cert'])) {
$authcfg['ldap_caref'] = isset($_GET['cert']) ? $_GET['cert'] : null; $authcfg = array();
ldap_setup_caenv($authcfg); $authcfg['ldap_caref'] = $_GET['cert'];
ldap_setup_caenv($authcfg);
}
$ldap_authcn = isset($_GET['authcn']) ? explode(";", $_GET['authcn']) : array(); $ldap_authcn = isset($_GET['authcn']) ? explode(";", $_GET['authcn']) : array();
if (isset($_GET['urltype']) && strstr($_GET['urltype'], "Standard")) { if (isset($_GET['urltype']) && strstr($_GET['urltype'], "Standard")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment