com php-src: Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack: ext/standard/ftp_fopen_wrapper .c
| From: | Ferenc Kovacs | Date: | Thu, 18 Aug 2016 10:52:00 +0000 |
| Subject: | com php-src: Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack: ext/standard/ftp_fopen_wrapper .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93957@lists.php.net to get a copy of this message | ||
Commit: 7d5ca3b28d3c8f8cae6cd874740f18fd3eb5100e
Author: Stanislav Malyshev <stas@php.net> Sun, 7 Aug 2016 16:17:54 -0700
Committer: Ferenc Kovacs <tyra3l@gmail.com> Thu, 18 Aug 2016 12:52:00 +0200
Parents: 75c0dbdd028ffa20eae5cf3a2fae194961464b8b
Branches: PHP-5.6.25
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7d5ca3b28d3c8f8cae6cd874740f18fd3eb5100e
Log:
Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
Bugs:
https://bugs.php.net/72771
Changed paths:
M ext/standard/ftp_fopen_wrapper.c
Diff:
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index bfb1631..5bffa47 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -188,7 +188,8 @@ static php_stream *php_ftp_fopen_connect(php_stream_wrapper *wrapper, const char
/* get the response */
result = GET_FTP_RESULT(stream);
if (result != 334) {
- use_ssl = 0;
+ php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Server doesn't support
FTPS.");
+ goto connect_errexit;
} else {
/* we must reuse the old SSL session id */
/* if we talk to an old ftpd-ssl */