com php-src: Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack: ext/standard/ftp_fopen_wrapper .c
| From: | Stanislav Malyshev | Date: | Wed, 17 Aug 2016 05:55:39 +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-93825@lists.php.net to get a copy of this message | ||
Commit: e018ff094f8505ea77f881ba11176e3ad0b4863e
Author: Stanislav Malyshev <stas@php.net> Sun, 7 Aug 2016 16:17:54 -0700
Parents: 639f7fde6a51c23d7c670358fbcb777ac1a143f3
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e018ff094f8505ea77f881ba11176e3ad0b4863e
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 */