[php-src] PHP-8.4: Fix GH-23619: ext/ftp: cryptic error on servers that don't support TLS session resumption on data connection
| From: | ndossche | Date: | Mon, 21 Sep 2026 20:29:56 +0000 |
| Subject: | [php-src] PHP-8.4: Fix GH-23619: ext/ftp: cryptic error on servers that don't support TLS session resumption on data connection | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141349@lists.php.net to get a copy of this message | ||
Author: ndossche (ndossche)
Date: 2026-09-21T22:27:29+02:00
Commit: https://github.com/php/php-src/commit/d841b499b836bf447683c9408fbf881d7a0cfd18
Raw diff: https://github.com/php/php-src/commit/d841b499b836bf447683c9408fbf881d7a0cfd18.diff
Fix GH-23619: ext/ftp: cryptic error on servers that don't support
TLS session resumption on data connection
Closes GH-23788.
Changed paths:
M NEWS
M ext/ftp/ftp.c
Diff:
diff --git a/NEWS b/NEWS
index 639a784a5a95..f76464756f34 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,10 @@ PHP NEWS
. Fixed bug GH-23729 (DOMXPath::__construct() use-after-free during an
evaluation). (David Carlier)
+- FTP:
+ . Fixed bug GH-23619 (cryptic error on servers that don't support TLS
+ session resumption on data connection). (ndossche)
+
- Intl:
. Fixed cloning IntlDateFormatter and MessageFormatter losing PHP-side state
such as dateType, timeType, calendar and the message pattern.
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 1345e378d8e3..31ec7dc7343a 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -1904,7 +1904,10 @@ data_accept(databuf_t *data, ftpbuf_t *ftp)
/* get the session from the control connection so we can re-use it */
session = ftp->last_ssl_session;
if (session == NULL) {
- php_error_docref(NULL, E_WARNING, "data_accept: failed to retrieve the existing SSL
session");
+ php_error_docref(NULL, E_WARNING, "data_accept: failed to retrieve the existing SSL session
from the control connection. "
+ "The server does not support TLS session resumption on the data connection,
"
+ "which is necessary to protect against session data stealing. "
+ "PHP does not support such configuration.");
SSL_free(data->ssl_handle);
return 0;
}