From: [EMAIL PROTECTED]
Operating system: Windows NT
PHP version: 4.2.2
PHP Bug Type: Unknown/Other Function
Bug description: ldap bind true
$user_ldappassword = "";
# connect to ldap
echo "<br>trying to connect to ldap...";
$ldap = ldap_connect($ldap_host);
if(!$ldap)
echo "<br>Can't etablish connection to ".$ldap_host;
else
echo "<br>Connection etablished to ".$ldap_host;
# get dn (if you don't know)
$bind_dn = ldap_bind($ldap); // anonymous
$search_dn = ldap_search($ldap,"o=awp","uid=".$user_ldapid);
$result_dn = ldap_get_entries($ldap,$search_dn);
for($i=0; $i < $result_dn['count']; $i++)
$user_dn = $result_dn[$i]['dn'];
echo "<br>dn: ".$user_dn;
# get authed
$auth_bind = ldap_bind($ldap,$user_dn,$user_ldappassword);
if($auth_bind)
echo "<br>You are in!";
else
echo "<br>You are out!";
# close connection to ldap
ldap_close($ldap);
_______________________________________________________
try to get non-anonymous bind with userpassword = "" (empty string), the
bind returns 1 and no error! (like this: LDAP: Unable to bind to server:
Inappropriate authentication in ...)
that's odd, isn't it?
--
Edit bug report at http://bugs.php.net/?id=19520&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19520&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19520&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19520&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19520&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19520&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19520&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19520&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19520&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19520&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19520&r=globals