ldap timeouts not enforced for ldaps protocol
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 40.4k
- Forks
- 8.1k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 96
Beschreibung
Description
According to site: https://bugs.php.net/bug.php?id=69574
I added LDAP_OPT_TIMEOUT to enforce bind operation time out. This worked for ldap protocol. But not for ldaps protocol.
steps to reproduce:
In one ssh session, I am running the following command to simulate a socket listener:
nc -l 636
And run following code:
<?php
$ldap = ldap_connect('ldaps://127.0.0.1:636');
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 3);
ldap_set_option($ldap, LDAP_OPT_TIMELIMIT, 3);
ldap_set_option($ldap, LDAP_OPT_TIMEOUT, 3);
ldap_bind($ldap);
?>
Resulted in this output:
This never times out
But I expected this output instead:
times out in 3 seconds.
PHP Version
PHP 7.4.30
Operating System
Windows 10
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das mitgelieferte PHP-Skript mit dem nc-Listener auszuführen, und konzentriere dich beim ldaps-Protokoll auf die Einstiegspunkte ldap_connect, ldap_set_option und ldap_bind. Verfolge, wie LDAP_OPT_NETWORK_TIMEOUT, LDAP_OPT_TIMELIMIT und LDAP_OPT_TIMEOUT angewendet werden, und überprüfe anschließend, dass der Bind nach etwa 3 Sekunden mit einem Timeout beendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, php
- Bereich
- authentication, networking
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100