ext/ftp: apply the connect timeout ceiling to the remaining entry points - #174
Closed
iliaal wants to merge 1 commit into
Closed
ext/ftp: apply the connect timeout ceiling to the remaining entry points#174iliaal wants to merge 1 commit into
iliaal wants to merge 1 commit into
Conversation
iliaal
force-pushed
the
ftp-ss001-ssl-timeout-cap
branch
from
July 16, 2026 14:45
158e19c to
86bba54
Compare
iliaal
force-pushed
the
ftp-ss001-ssl-timeout-cap
branch
2 times, most recently
from
July 16, 2026 14:58
48eccae to
274cbec
Compare
phpGH-20601 capped the timeout in ftp_connect() so a value that overflows the timeval conversion cannot reach php_network_set_limit_time(). ftp_ssl_connect() and ftp_set_option(FTP_TIMEOUT_SEC) kept rejecting only non-positive values, so PHP_INT_MAX still reached ftp_open() and my_poll() through them. Apply the same bound to both. ftp_ssl_connect() with PHP_INT_MAX hung before this rather than reporting the bad argument. Closes phpGH-22767
iliaal
force-pushed
the
ftp-ss001-ssl-timeout-cap
branch
from
July 16, 2026 16:24
274cbec to
fc3018d
Compare
Owner
Author
|
Promoted upstream: php#22767 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
phpGH-20601 capped the timeout in
ftp_connect()so a value that overflows the timeval conversion cannot reachphp_network_set_limit_time().ftp_ssl_connect()andftp_set_option(FTP_TIMEOUT_SEC)kept rejecting only non-positive values, so PHP_INT_MAX still reached ftp_open() and my_poll() through them. Both now apply the same bound.The three entry points before this change:
Floor PHP-8.4, matching where phpGH-20601 landed.