diff --git a/upload/archiver/index.php b/upload/archiver/index.php
index 7320c6c78a9b704a99a29ae35ca4b445fd493fcd..b048b662f3049bc3f98b2f3c5439abce70e11cbd 100644
--- a/upload/archiver/index.php
+++ b/upload/archiver/index.php
@@ -13,7 +13,7 @@ chdir('../');
$querystring = $_SERVER['QUERY_STRING'];
-if(!empty($_GET['action'])) {
+if(!empty($_GET['action']) && !empty($_GET['value'])) {
$querystring = $_GET['action'].'-'.$_GET['value'];
}
diff --git a/upload/install/include/install_function.php b/upload/install/include/install_function.php
index 5c9adab6aadb7eb9c4922ab8935ede75a0a23427..d3dc45d4dd02c967cf43aa31ce4f9a6bff5c00fa 100644
--- a/upload/install/include/install_function.php
+++ b/upload/install/include/install_function.php
@@ -885,7 +885,15 @@ function dfopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $
$ch = curl_init();
$ip && curl_setopt($ch, CURLOPT_HTTPHEADER, array("Host: ".$host));
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
- curl_setopt($ch, CURLOPT_URL, $scheme.'://'.($ip ? $ip : $host).':'.$port.$path);
+ // 在请求主机名并非一个合法 IP 地址, 且 PHP 版本 >= 5.5.0 时, 使用 CURLOPT_RESOLVE 设置固定的 IP 地址与域名关系
+ // 在不支持的 PHP 版本下, 继续采用原有不支持 SNI 的流程
+ if(!filter_var($host, FILTER_VALIDATE_IP) && version_compare(PHP_VERSION, '5.5.0', 'ge')) {
+ curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);
+ curl_setopt($ch, CURLOPT_RESOLVE, array("$host:$port:$ip"));
+ curl_setopt($ch, CURLOPT_URL, $scheme.'://'.$host.':'.$port.$path);
+ } else {
+ curl_setopt($ch, CURLOPT_URL, $scheme.'://'.($ip ? $ip : $host).':'.$port.$path);
+ }
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
diff --git a/upload/source/class/table/table_forum_thread.php b/upload/source/class/table/table_forum_thread.php
index 797deeee0dee4e1baff6755672e58ba76d6b4ce8..2736fec2be7160479716adb7ffcac5104789eb24 100644
--- a/upload/source/class/table/table_forum_thread.php
+++ b/upload/source/class/table/table_forum_thread.php
@@ -506,7 +506,7 @@ class table_forum_thread extends discuz_table
}
}
}
- if($firstpage && !empty($tlkey) && ($ttl = getglobal('setting/memory/forum_thread_forumdisplay')) !== null && ($data = $this->fetch_cache($tlkey, 'forumdisplay_')) !== false) {
+ if(!$tableid && $firstpage && !empty($tlkey) && ($ttl = getglobal('setting/memory/forum_thread_forumdisplay')) !== null && ($data = $this->fetch_cache($tlkey, 'forumdisplay_')) !== false) {
$delusers = $this->fetch_cache('deleteuids', '');
if(!empty($delusers)) {
foreach($data as $tid => $value) {
@@ -521,7 +521,7 @@ class table_forum_thread extends discuz_table
}
}
$data = DB::fetch_all("SELECT * FROM ".DB::table($this->get_table_name($tableid))." $forceindex".$this->search_condition($conditions)." $ordersql ".DB::limit($start, $limit));
- if(!defined('IN_MOBILE') && $firstpage && !empty($tlkey) && ($ttl = getglobal('setting/memory/forum_thread_forumdisplay')) !== null) {
+ if(!defined('IN_MOBILE') && !$tableid && $firstpage && !empty($tlkey) && ($ttl = getglobal('setting/memory/forum_thread_forumdisplay')) !== null) {
$this->store_cache($tlkey, $data, $ttl, 'forumdisplay_');
}
return $data;
diff --git a/upload/source/function/function_filesock.php b/upload/source/function/function_filesock.php
index 1a8594e56e8c68f26f404a82e36de40151a261f7..d0bd95e16dd55250c95062d929aa595285b002fd 100644
--- a/upload/source/function/function_filesock.php
+++ b/upload/source/function/function_filesock.php
@@ -75,7 +75,7 @@ function _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FAL
return '';
}
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
- $port = !empty($matches['port']) ? $matches['port'] : ($scheme == 'http' ? '80' : '');
+ $port = !empty($matches['port']) ? $matches['port'] : (strtolower($scheme) == 'https' ? 443 : 80);
$boundary = $encodetype == 'URLENCODE' ? '' : random(40);
if($post) {
@@ -95,7 +95,15 @@ function _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FAL
if($httpheader) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
}
- curl_setopt($ch, CURLOPT_URL, $scheme.'://'.($ip ? $ip : $host).($port ? ':'.$port : '').$path);
+ // 在请求主机名并非一个合法 IP 地址, 且 PHP 版本 >= 5.5.0 时, 使用 CURLOPT_RESOLVE 设置固定的 IP 地址与域名关系
+ // 在不支持的 PHP 版本下, 继续采用原有不支持 SNI 的流程
+ if(!filter_var($host, FILTER_VALIDATE_IP) && version_compare(PHP_VERSION, '5.5.0', 'ge')) {
+ curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);
+ curl_setopt($ch, CURLOPT_RESOLVE, array("$host:$port:$ip"));
+ curl_setopt($ch, CURLOPT_URL, $scheme.'://'.$host.':'.$port.$path);
+ } else {
+ curl_setopt($ch, CURLOPT_URL, $scheme.'://'.($ip ? $ip : $host).':'.$port.$path);
+ }
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
diff --git a/upload/source/function/function_forumlist.php b/upload/source/function/function_forumlist.php
index 7da26a7d06e85b24c55918b9ee80ec2fe573aa32..2e478bdc0f8e1c3aa9fafedecf524907bf3be2c5 100644
--- a/upload/source/function/function_forumlist.php
+++ b/upload/source/function/function_forumlist.php
@@ -36,7 +36,7 @@ function forum(&$forum) {
if($forum['icon']) {
$forum['icon'] = get_forumimg($forum['icon']);
- $forum['icon'] = '';
+ $forum['icon'] = '
';
}
$lastpost = array(0, 0, '', '');
diff --git a/upload/source/function/media/media_ixigua.php b/upload/source/function/media/media_ixigua.php
new file mode 100644
index 0000000000000000000000000000000000000000..64e31a33ac5af7fa992c97a981a20652cbcee579
--- /dev/null
+++ b/upload/source/function/media/media_ixigua.php
@@ -0,0 +1,15 @@
+(.+?)<\/span>/i", $str, $image)) {
$imgurl = trim($image[1]);
}
diff --git a/upload/source/function/media/media_youtube.php b/upload/source/function/media/media_youtube.php
index fb74640547f00608f39263dd2dc754a4e92050db..b516a5cf4cf12441319b865ce1f20d2d8966e035 100644
--- a/upload/source/function/media/media_youtube.php
+++ b/upload/source/function/media/media_youtube.php
@@ -4,14 +4,14 @@ if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
-$checkurl = array('www.youtube.com/watch?');
+$checkurl = array('youtube.com/watch?');
function media_youtube($url, $width, $height) {
- if(preg_match("/^https?:\/\/www.youtube.com\/watch\?v=([^\/&]+)&?/i", $url, $matches)) {
- $flv = 'https://www.youtube.com/v/'.$matches[1].'&hl=zh_CN&fs=1';
- $iframe = 'https://www.youtube.com/embed/'.$matches[1];
+ if(preg_match("/^https?:\/\/(|m.|www.)youtube.com\/watch\?v=([^\/&]+)&?/i", $url, $matches)) {
+ $flv = 'https://www.youtube.com/v/'.$matches[2].'&fs=1';
+ $iframe = 'https://www.youtube.com/embed/'.$matches[2];
if(!$width && !$height) {
- $str = file_get_contents($url, false, $ctx);
+ $str = file_get_contents($url, false);
if(!empty($str) && preg_match("/'VIDEO_HQ_THUMB':\s'(.+?)'/i", $str, $image)) {
$url = substr($image[1], 0, strrpos($image[1], '/')+1);
$filename = substr($image[1], strrpos($image[1], '/')+3);
diff --git a/upload/source/include/spacecp/spacecp_credit_base.php b/upload/source/include/spacecp/spacecp_credit_base.php
index 695edaef87f67e8b45e15c22f653ef1de66f6d2b..2cd092f0dac61847fb525fe408d6ff5f9683ad2b 100644
--- a/upload/source/include/spacecp/spacecp_credit_base.php
+++ b/upload/source/include/spacecp/spacecp_credit_base.php
@@ -150,9 +150,9 @@ if($_GET['op'] == 'base') {
'submitdate' => $_G['timestamp'],
));
- include template('common/header_ajax');
- echo '