#39291 [NEW]: ldap_sasl_bind sends wrong authcid
From: lee dot essen at nowonline dot co dot uk
Operating system: Solaris 10
PHP version: 5.1.6
PHP Bug Type: LDAP related
Bug description: ldap_sasl_bind sends wrong authcid
Description:
------------
** Caveat: I am not an LDAP, PHP or SASL expert, so I could be a long way
off the mark here **
This is similar to bug 35611 (which is marked as Bogus!) and related to
30189, but I believe the problem is with authcid and not authzid.
ldap_sasl_bind sends the binddn as the authcid, this behaviour differs to
the standard ldapsearch etc utilities when using "-U" to send a username.
This basically means that I cannot get it to bind to my ldap server,
looking at the slapd debug it seems to send a username like...
username="cn=My Name,ou=People,..."
... when I look at the debug from using an ldapsearch -U it gets a
username="shortname" type output.
By hacking the code to add another option (authcid) to the php
ldap_sasl_bind function and sending that for the authcid instead of binddn
everything works perfectly.
A simple example is that you don't need to provide a BindDN to ldapsearch
if you use -U, this is because the username will be mapped by the
authz-regex to a real object.
If you don't specify a binddn with PHP you get a "SASL bind in progress"
error, and if you just specify a username then it fails with "invalid
dn".
(I can provide a very simple patch that fixes the problem if it helps)
Reproduce code:
---------------
See description above.
Expected result:
----------------
See description above.
Actual result:
--------------
See description above.
--
Edit bug report at http://bugs.php.net/?id=39291&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39291&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39291&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39291&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39291&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39291&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39291&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39291&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39291&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39291&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39291&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39291&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39291&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39291&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39291&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39291&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39291&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39291&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39291&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39291&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39291&r=mysqlcfg
Thread (7 messages)
- lee dot essen at nowonline dot co dot uk