Req #27576 [Opn->Nab]: Race condition inherent in php_ldap
| From: | mcmic@php.net | Date: | Wed, 26 Jul 2017 10:11:42 +0000 |
| Subject: | Req #27576 [Opn->Nab]: Race condition inherent in php_ldap | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210345@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=27576&edit=1
ID: 27576
Updated by: mcmic@php.net
Reported by: jcllings at javahop dot com
Summary: Race condition inherent in php_ldap
-Status: Open
+Status: Not a bug
Type: Feature/Change Request
Package: LDAP related
Operating System: Probably ALL
PHP Version: 7.1
Block user comment: N
Private report: N
New Comment:
No, the dn is the dn to modify.
You can use:
ldap_modify($ldap, 'cn=jon,dc=base', ['mail' =>
'newmail@example.com']) to change the mail address of jon. No race conditions.
Previous Comments:
------------------------------------------------------------------------
[2004-03-12 03:28:31] derick@php.net
This is not really a bug, but more a feature request. Reclassifying.
------------------------------------------------------------------------
[2004-03-11 20:09:13] jcllings at javahop dot com
Description:
------------
From the documentation:
ldap_modify() function is used to modify the existing entries in the
LDAP directory. The structure of the entry is same as in ldap_add().
...and
bool ldap_add ( resource link_identifier, string dn, array entry)
The replace also has the same prototype:
bool ldap_mod_replace ( resource link_identifier, string dn, array entry)
Where, according to the doc, 'resource link_identifier' is the connection, 'string
dn' is who to bind as and 'array entry' is the modified data. No ability to specify
*what* to modify so we will have to perform a separate action to retrieve this. In the meantime the
data has been changed by another process, perhaps.
Allow me to further illustrate:
If Jon's email address is the old one, update it to the new one. This activity cannot be
safely performed because using PHP you have to implement it in a two step process creating a
potential race condition.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=27576&edit=1