aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_update.php2
-rw-r--r--phpBB/includes/functions_admin.php13
-rw-r--r--phpBB/language/en/common.php1
3 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index f0365e8e66..ee4e49249d 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -37,7 +37,7 @@ class acp_update
$errstr = '';
$errno = 0;
- $info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
+ $info = obtain_latest_version_info(request_var('versioncheck_force', false));
if ($info === false)
{
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 71f8ab572e..3f9e517fdf 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -3111,7 +3111,7 @@ function get_database_size()
/**
* Retrieve contents from remotely stored file
*/
-function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 10)
+function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
{
global $user;
@@ -3121,6 +3121,9 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
@fputs($fsock, "HOST: $host\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
+ $timer_stop = time() + $timeout;
+ stream_set_timeout($fsock, $timeout);
+
$file_info = '';
$get_info = false;
@@ -3143,6 +3146,14 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
return false;
}
}
+
+ $stream_meta_data = stream_get_meta_data($fsock);
+
+ if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
+ {
+ $errstr = $user->lang['FSOCK_TIMEOUT'];
+ return false;
+ }
}
@fclose($fsock);
}
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index e04a194839..c79197d07a 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -200,6 +200,7 @@ $lang = array_merge($lang, array(
'FORUM_RULES_LINK' => 'Please click here to view the forum rules',
'FROM' => 'from',
'FSOCK_DISABLED' => 'The operation could not be completed because the <var>fsockopen</var> function has been disabled or the server being queried could not be found.',
+ 'FSOCK_TIMEOUT' => 'A timeout occurred while reading from the network stream.',
'FTP_FSOCK_HOST' => 'FTP host',
'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site.',