diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-02-03 10:31:56 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-02-03 10:31:56 +0100 |
commit | 013d4d463392ca70106d9a3e8597e05f8e9a09ff (patch) | |
tree | 37e7cbabd1a5ddd4c564cdf171dc76631c5958ae /phpBB/phpbb/files | |
parent | 03fba990747bb0eeda47c8247b5808257d1443b7 (diff) | |
parent | f2f9ce544fa166449e261c1b7d12135dc6d58cb4 (diff) | |
download | forums-013d4d463392ca70106d9a3e8597e05f8e9a09ff.tar forums-013d4d463392ca70106d9a3e8597e05f8e9a09ff.tar.gz forums-013d4d463392ca70106d9a3e8597e05f8e9a09ff.tar.bz2 forums-013d4d463392ca70106d9a3e8597e05f8e9a09ff.tar.xz forums-013d4d463392ca70106d9a3e8597e05f8e9a09ff.zip |
Merge branch '3.1.x'
Conflicts:
phpBB/includes/functions_upload.php
Diffstat (limited to 'phpBB/phpbb/files')
-rw-r--r-- | phpBB/phpbb/files/types/remote.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/phpbb/files/types/remote.php b/phpBB/phpbb/files/types/remote.php index 33cbfb00ae..d311face98 100644 --- a/phpBB/phpbb/files/types/remote.php +++ b/phpBB/phpbb/files/types/remote.php @@ -86,9 +86,18 @@ class remote extends base $url = parse_url($upload_url); + $default_port = 80; + $hostname = $url['host']; + + if ($url['scheme'] == 'https') + { + $default_port = 443; + $hostname = 'tls://' . $url['host']; + } + $host = $url['host']; $path = $url['path']; - $port = (!empty($url['port'])) ? (int) $url['port'] : 80; + $port = (!empty($url['port'])) ? (int) $url['port'] : $default_port; $upload_ary['type'] = 'application/octet-stream'; @@ -104,7 +113,7 @@ class remote extends base $errno = 0; $errstr = ''; - if (!($fsock = @fsockopen($host, $port, $errno, $errstr))) + if (!($fsock = @fsockopen($hostname, $port, $errno, $errstr))) { return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'NOT_UPLOADED')); } |