Bug #74598 [Ver->Csd]: unlink ignores stream context
Edit report at https://bugs.php.net/bug.php?id=74598&edit=1
ID: 74598
Updated by: pollita@php.net
Reported by: ma at temponizer dot dk
Summary: unlink ignores stream context
-Status: Verified
+Status: Closed
Type: Bug
Package: FTP related
Operating System: CentOS
PHP Version: 7.0.19
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of pollita
Revision: http://git.php.net/?p=php-src.git;a=commit;h=05849a242a878d5513e3e3be78a0c89fb9fa342b
Log: Bugfix #74598 ftp:// ignores context
Previous Comments:
------------------------------------------------------------------------
[2017-05-16 07:09:45] requinix@php.net
Indeed, it is ignored.
https://github.com/php/php-src/blob/PHP-7.0.19/ext/standard/ftp_fopen_wrapper.c#L911
Same for rename, mkdir, and rmdir. opendir and stat do use it.
------------------------------------------------------------------------
[2017-05-16 06:57:53] ma at temponizer dot dk
Just tested further and it seems like it ignores the stream context completely.
------------------------------------------------------------------------
[2017-05-15 14:10:40] ma at temponizer dot dk
Description:
------------
When using unlink for a FTPS filename with a stream context where verify_peer is set to false, it
still tries to verify the certificate.
This results in two warnings
- "SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
- "Unable to connect to ftps://servername/path"
Test script:
---------------
$sslContext = stream_context_create(['ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
]]);
unlink('ftps://servername/path', $sslContext);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74598&edit=1
Thread (5 messages)