X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=img.php;h=087ff2da69462cbda39e858f43f4b96d8e8c28bf;hb=44c78e5319186933ce50e0e91c3dcc3ab08e6de7;hp=3cdd23dc7d23ace64fb5adbaaf0f74442c5527d8;hpb=55e57dc0b0041d58c671cfdcb9fb183f0b868969;p=contagged diff --git a/img.php b/img.php index 3cdd23d..087ff2d 100644 --- a/img.php +++ b/img.php @@ -2,10 +2,18 @@ require_once('inc/init.php'); ldap_login(); +if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){ + header("HTTP/1.0 401 Access Denied"); + echo '

Access Denied

'; + exit(); +} + $dn = $_REQUEST['dn']; $sr = ldap_search($LDAP_CON,$dn,'(objectClass=inetOrgPerson)',array($FIELDS['photo'])); if(!ldap_count_entries($LDAP_CON,$sr)){ + header("HTTP/1.0 404 Not Found"); + echo '

Not Found

'; exit; } $result = ldap_get_binentries($LDAP_CON, $sr);