php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69471 php-ldap is using deprecated ldap functions
Submitted: 2015-04-16 17:04 UTC Modified: 2017-01-10 07:54 UTC
From: come dot bernigaud at opensides dot be Assigned: mcmic (profile)
Status: Closed Package: LDAP related
PHP Version: 5.6.8RC1 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: come dot bernigaud at opensides dot be
New email:
PHP Version: OS:

 

 [2015-04-16 17:04 UTC] come dot bernigaud at opensides dot be
Description:
------------
PHP-LDAP is using several deprecated ldap functions from openldap, the attached patch replace these calls by calls the new functions.
I did not remove the -DLDAP_DEPRECATED=1 because there are still some use of deprecated functions after the patch.
This patch is derivated from http://markmail.org/message/66qafbxgaztux6df , but I removed the parts which are not surrounded by #ifdef LDAP_API_FEATURE_X_OPENLDAP to be safe.


Patches

replaced-calls-to-deprecated-openldap-functions (last revision 2015-04-16 17:06 UTC by come dot bernigaud at laposte dot net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-10 10:29 UTC] mcmic@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mcmic
 [2015-06-17 13:54 UTC] mcmic@php.net
This first patch has been pushed.
All obsolete functions should be removed so that we can remove the -DLDAP_DEPRECATED=1 option
 [2015-10-29 11:31 UTC] blizzz at owncloud dot com
Is this related to https://github.com/php/php-src/commit/e7af0fe1eb89e40671e86a588aa1b78607b85461 ?

It turns out that some usages of ldap_connect now fail to work (e.g. https://www.netways.org/issues/2931, https://dev.icinga.org/issues/9298, https://github.com/owncloud/core/issues/20020). Is this as intended?
 [2015-11-03 04:10 UTC] mcmic@php.net
It definitely seems related, this was not intended.
What I don’t get is that there is a test for this: https://github.com/php/php-src/blob/PHP-5.6/ext/ldap/tests/ldap_connect_variation.phpt
And at the time it was passing. I’m gonna build last git and try to see if it passes.
 [2015-11-03 04:56 UTC] mcmic@php.net
Ok, some of the bug report you mentioned were misleading, what is broken is using host:port, using a full ldap URI like ldap://host:port works as expected.

I’m gonna ask on the ML but this does not seem like a big regression to me as the use of host:port was not tested by the tests and not authorized by the documentation. (But it does seem to break existing code, so I’m not sure)
 [2015-11-03 11:19 UTC] blizzz at owncloud dot com
Thank you for responding. Meanwhile I also investigated more in our (ownCloud) case and found it was a bug with us that on one place we just added the port to the host without verifying whether a URL was given. I apologize for not posting here after fixing this. From what I can tell, it indeed looks good and the patch is fine, our usage was not. Sorry for troubling you.
 [2017-01-10 07:54 UTC] heiglandreas@php.net
-Status: Assigned +Status: Closed
 [2017-01-10 07:54 UTC] heiglandreas@php.net
From what i've seen this issue is solved in the current releases of PHP.

So I'm closing it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 04:01:27 2024 UTC