#44534 [Opn]: ldap_add() (perhaps other ldap functions) crash
| From: | thegner at trilliumit dot com | Date: | Tue, 25 Mar 2008 19:15:18 +0000 |
| Subject: | #44534 [Opn]: ldap_add() (perhaps other ldap functions) crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123625@lists.php.net to get a copy of this message | ||
ID: 44534
User updated by: thegner at trilliumit dot com
Reported By: thegner at trilliumit dot com
Status: Open
Bug Type: Reproducible crash
Operating System: ubuntu gutsy server
PHP Version: 5.2.5
New Comment:
Sorry,
This Line: ldap_add($gc_con, "CN=Die\, Test,OU=Users,DC=Domain,DC=Com",
$user_attributes);
should be: ldap_add($gc_con, "CN=Die\\,
Test,OU=Users,DC=Domain,DC=Com",
$user_attributes);
Previous Comments:
------------------------------------------------------------------------
[2008-03-25 19:12:42] thegner at trilliumit dot com
Description:
------------
when doing an ldap_add() with "Die" as a persons last name, the server
returns unwilling to perform. If I change only the last name to "Die2"
it operates as expected. In our environment the following user
attributes are associated with the last name.
sn
cn
displayName
distinguishedName
sAMAccountName
mailNickname
userPrincipalName
unicodePwd
The ldap directory is Microsoft Active Directory on Windows Server 2003
Reproduce code:
---------------
<?php
$user_attributes['sAMAccountName'] = "tdie";
$user_attributes['mailNickname'] = "tdie";
$user_attributes['userPrincipalName'] = "tdie@domain.com";
$user_attributes['unicodePwd'] = "\"\000t\000d\000i\000e\000\"\000";
$user_attributes['givenName'] = "Test";
$user_attributes['sn'] = "Die";
$user_attributes['cn'] = "Die, Test";
$user_attributes['displayName'] = "Die, Test";
$user_attributes['objectClass'][0] = "top";
$user_attributes['objectClass'][1] = "person";
$user_attributes['objectClass'][2] = "organizationalPerson";
$user_attributes['objectClass'][3] = "user";
//$gc_con previously set to valid ldap_connect()
ldap_add($gc_con, "CN=Die\, Test,OU=Users,DC=Domain,DC=Com",
$user_attributes);
?>
Expected result:
----------------
We should expect the object to be added to the directory.
Actual result:
--------------
Error: Add: Server unwilling to perform...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44534&edit=1