mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12618] Allow extension author to use SSL for version-check
For version-check a new parameter 'ssl' is introduced. If set to true, it will use 443 as port for the file_downloader. In file_downloader, the host parameter of fsockopen is appended with 'ssl://' in case the port is 443 in order to use SSL. PHPBB3-12618
This commit is contained in:
@@ -42,7 +42,7 @@ class file_downloader
|
||||
$this->error_number = 0;
|
||||
$this->error_string = '';
|
||||
|
||||
if ($socket = @fsockopen($host, $port, $this->error_number, $this->error_string, $timeout))
|
||||
if ($socket = @fsockopen(($port == 443 ? 'ssl://' : '') . $host, $port, $this->error_number, $this->error_string, $timeout))
|
||||
{
|
||||
@fputs($socket, "GET $directory/$filename HTTP/1.0\r\n");
|
||||
@fputs($socket, "HOST: $host\r\n");
|
||||
|
Reference in New Issue
Block a user