On Thu, Nov 5, 2015 at 9:53 PM, Adam Howard <oldschool...@gmail.com> wrote:

> I don't think it is possible to make everyone happy all the time.  I think
> this should be kept for a user code fix.
>
>
please don't top post on the php.net mailing lists.
on one hand this change doesn't really make any person happy (apart maybe
the ext/ldap maintainers) but already caused headache for people upgrading
to a patch release and expecting their code to still work.
I don't think that it is tradeoff worth taking.

now I've just took the time to look the actual commit which break this
feature:
https://github.com/php/php-src/commit/e7af0fe1eb89e40671e86a588aa1b78607b85461
previously we were just passing host and port to ldap_init:
https://github.com/php/php-src/commit/e7af0fe1eb89e40671e86a588aa1b78607b85461#diff-baba61601f82518312197f5420a76ae7L346
and the documentation for ldap_init states that
*ldap_open()* takes *host*, the hostname on which the LDAP server is
running, and *port*, the port number to which to connect. If the default
IANA-assigned port of 389 is desired, LDAP_PORT should be specified for
*port*. The *host* parameter may contain a blank-separated list of hosts to
try to connect to, and each host may optionally by of the form *host:port*.
If present, the *:port* overrides the *port* parameter to *ldap_open()*.
http://linux.die.net/man/3/ldap_init

so this wasn't just a bogus feature but php being the glue and the
underlying library providing this feature, then when we removed the else
block to remove the usage of the now deprecated ldap_open we lost this
feature.
it would be fairly trivial to transform host:port formatted hosts to be
transformed to the new schema://host:port format required by
ldap_initialize (and ldap_is_ldap_url()) instead of just assuming that
receiving an url not validated by ldap_is_ldap_url() means that we received
a naked hostname

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

Reply via email to