File: includes/functions_upload.php
Unmodified
Added
Modified
Removed
Line 775 | Line 775 |
---|
}
$url = parse_url($upload_url);
|
}
$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'];
|
$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';
| $upload_ary['type'] = 'application/octet-stream';
|
Line 818 | Line 827 |
---|
$errno = 0; $errstr = '';
|
$errno = 0; $errstr = '';
|
if (!($fsock = @fsockopen($host, $port, $errno, $errstr)))
| if (!($fsock = @fsockopen($hostname, $port, $errno, $errstr)))
|
{ $file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']); return $file;
| { $file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']); return $file;
|
Line 919 | Line 928 |
---|
return $file; }
|
return $file; }
|
$tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? false : $phpbb_root_path . 'cache';
| $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? sys_get_temp_dir() : $phpbb_root_path . 'cache';
|
$filename = tempnam($tmp_path, unique_id() . '-');
if (!($fp = @fopen($filename, 'wb')))
| $filename = tempnam($tmp_path, unique_id() . '-');
if (!($fp = @fopen($filename, 'wb')))
|