Update index.php

This commit is contained in:
2018-01-26 13:28:02 -05:00
parent ea3a5ab35e
commit 45c2dbf9e3

View File

@@ -26,9 +26,7 @@ if(isset($_POST['username']) && isset($_POST['password'])){
$bind = @ldap_bind($ad, $username.'@'.$domain, $password);
if ($bind) {
$userDN = getDN($ad, $username, $baseDN);
$groupDN = getDN($ad, "OpenVPN", $baseDN);
if (checkGroup($ad, $userDN, getDN($ad, $group, $baseDN))){
if (checkGroup($ad, getDN($ad, $username, $baseDN), getDN($ad, $group, $baseDN))){
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($configFile).'"');
header('Pragma: no-cache');