Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88288 invoked from network); 3 Nov 2015 19:41:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Nov 2015 19:41:57 -0000 Authentication-Results: pb1.pair.com header.from=andreas@heigl.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andreas@heigl.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain heigl.org from 195.191.240.18 cause and error) X-PHP-List-Original-Sender: andreas@heigl.org X-Host-Fingerprint: 195.191.240.18 hos109.unaxus.net Received: from [195.191.240.18] ([195.191.240.18:50276] helo=hos109.unaxus.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/68-13519-10E09365 for ; Tue, 03 Nov 2015 14:41:55 -0500 Received: from heigl.gw.tgnet.de ([80.72.250.242]:64372 helo=wdv-hg-0C07-zX4090-HeiglAndreas.local) by hos109.unaxus.net with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86) (envelope-from ) id 1ZthSo-004Mpb-2W for internals@lists.php.net; Tue, 03 Nov 2015 20:41:50 +0100 To: "internals@lists.php.net" References: <3187501.to7rK1FKUl@mcmic-probook> <5638C725.60805@heigl.org> <7F.A7.13519.74609365@pb1.pair.com> Message-ID: <56390DFD.2050203@heigl.org> Date: Tue, 3 Nov 2015 20:41:49 +0100 MIME-Version: 1.0 In-Reply-To: <7F.A7.13519.74609365@pb1.pair.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms030800000403020706030608" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hos109.unaxus.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - heigl.org X-Get-Message-Sender-Via: hos109.unaxus.net: authenticated_id: a.heigl+heigl.org/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hos109.unaxus.net: a.heigl@heigl.org Subject: Re: [PHP-DEV] Small regression in PHP-LDAP From: andreas@heigl.org (Andreas Heigl) --------------ms030800000403020706030608 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am 03.11.15 um 20:07 schrieb Andrea Faulds: > Hi Andreas, >=20 > Andreas Heigl wrote: >> +1 on that solution. Just throwing "host:port" onto something doesn't >> help anyone. Try that with "www.google.com:443" in your favourite >> browser. Most will give you an error (if it's not port 80). So those >> people that try it will eventually read the documentation on php.net a= nd >> then see that it's not supported. >=20 > If you give the port number for a non-HTTP TCP application then yes, > your browser will spit an error back at you, because HTTP is the > implicit URI scheme. That doesn't mean hostname:port is wrong, it's > perfectly valid for HTTP. Similarly, I could give my LDAP URI as > google.com:80 and get an error, but I don't think that's a fault with > hostname:port. >=20 > The PHP interpreter itself uses it for HTTP: >=20 > $ php -S localhost:8000 >=20 > I'm unconvinced. Hi Andrea. The documentation mentions two different ways of using ldap_connect: either with 2 parameters being host and port (from which the port is optional) or with a single parameter using an LDAP-URI. There is a third possibility mentioned in one of the comments of passing in a string of multiple LDAP-URIs separated by a space. But I couldn't find a mention of "host:port". As there is an explicit mention of an URI the scheme is mandatory. And as the scheme is used to differentiate between ldap and ldaps it's a somewhat different story than the paramteter to phps internal server as that one ONLY serves http (AFAIK). And it is explicitly stated that the first version of ldap_connect with two parameters *only* allows connections via ldap (not ldaps). If you want to use ldaps as scheme you are required to use the second form with the LDAP-URI. So if someone passes a single parameter 'host:port' to ldap_connect I'm sure they want to use ldaps as protocol? In my eyes the main question is whether we want to support something that was never intended and nowhere documented just because someone tried something and by luck didn't break something. I'd consider the possibility to pass 'host:port' as single parameter to ldap_connect as a bug and not as a feature. Therefore I'd rather see that bug fixed sooner than later. And have the documentation point out explicitly that using 'host:port' without a scheme is NOT supported even though it might have once worked. Cheers Andreas --=20 ,,, (o o) +---------------------------------------------------------ooO-(_)-Ooo-+ | Andreas Heigl | | mailto:andreas@heigl.org N 50=C2=B022'59.5" E 08=C2=B0= 23'58" | | http://andreas.heigl.org http://hei.gl/wiFKy7 | +---------------------------------------------------------------------+ | http://hei.gl/root-ca | +---------------------------------------------------------------------+ --------------ms030800000403020706030608 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC BawwggWoMIIDkKADAgECAgMPT+kwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcwHhcN MTQwNzIzMDkzMjQ5WhcNMTYwNzIyMDkzMjQ5WjBcMRYwFAYDVQQDEw1BbmRyZWFzIEhlaWds MSAwHgYJKoZIhvcNAQkBFhFhLmhlaWdsQGhlaWdsLm9yZzEgMB4GCSqGSIb3DQEJARYRYW5k cmVhc0BoZWlnbC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCn6XLcWFLD vAXgllUikBAU2Rv63m7ZKP+ZU/2HTWDW0BJ2muK7GD3cGZxbKKosO6l6PSqqmLqUJ8G6b/85 iPQmNL5z+LG/+wt/p31SOMAWc5UA7CJAQ9pivUCcV+Yt0LzoxWO5ME2rEZ/ioB2tXMilkJLM U4f5A9m3YZVSKj3xbM7rIpQEZiK0TrZ4MchTwPMdAwBLBxCoAztcg4Yj4qKd+IQLff0Ldhc5 3tc9b+XT7YzWLY5rQKHE+hKqIAdvYfqqKQZFHBBXptSXUXBeYK5a4UT0fpnM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