From 65a02936675373bf670fcc77b61a095251e3844d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Thu, 2 Apr 2020 15:36:46 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=97=A0=E6=B3=95=E4=BB=8EHTML?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E8=83=8C=E6=99=AFBBCode=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/function/function_editor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upload/source/function/function_editor.php b/upload/source/function/function_editor.php index cf42de1eb..5564f7d7e 100644 --- a/upload/source/function/function_editor.php +++ b/upload/source/function/function_editor.php @@ -125,6 +125,8 @@ function html2bbcode($text) { "/(.+?)<\/a>/is", "//siU", "/(.+?)<\/span>/is", + "/(.+?)<\/font>/is", + "/(.+?)<\/font>/is", ); $pregreplace = array( '', @@ -140,6 +142,8 @@ function html2bbcode($text) { '\1', "\n", "[float=\\1]\\2[/float]", + "[backcolor=\\1]\\2[/backcolor]", + "[backcolor=\\1]\\2[/backcolor]", ); $text = preg_replace($pregfind, $pregreplace, $text); $text = preg_replace_callback("/]*(width|background|background-color|bgcolor)[^>]*)>/siU", 'html2bbcode_callback_tabletag_1', $text); -- Gitee From 8460e039583336337c940a056799010ecddb6b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 8 Apr 2020 00:16:11 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=BD=93=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E8=AE=BE=E7=BD=AE=E4=B8=AD=E8=AE=BE=E7=BD=AE=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=BB=E9=A1=B5=E4=B8=8D=E5=85=81=E8=AE=B8=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=97=B6=E5=87=BA=E7=8E=B0=E5=87=BD=E6=95=B0=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/function/function_home.php | 42 +++++++++++++++++++ upload/source/include/space/space_index.php | 38 +---------------- upload/source/include/space/space_profile.php | 38 +---------------- 3 files changed, 45 insertions(+), 73 deletions(-) diff --git a/upload/source/function/function_home.php b/upload/source/function/function_home.php index a9a058cbb..cd50e0346 100644 --- a/upload/source/function/function_home.php +++ b/upload/source/function/function_home.php @@ -590,4 +590,46 @@ function getthread() { return $threads; } +function show_view() { + global $_G, $space; + + if(!$space['self'] && $_G['uid']) { + $visitor = C::t('home_visitor')->fetch_by_uid_vuid($space['uid'], $_G['uid']); + $is_anonymous = empty($_G['cookie']['anonymous_visit_'.$_G['uid'].'_'.$space['uid']]) ? 0 : 1; + if(empty($visitor['dateline'])) { + $setarr = array( + 'uid' => $space['uid'], + 'vuid' => $_G['uid'], + 'vusername' => $is_anonymous ? '' : $_G['username'], + 'dateline' => $_G['timestamp'] + ); + C::t('home_visitor')->insert($setarr, false, true); + show_credit(); + } else { + if($_G['timestamp'] - $visitor['dateline'] >= 300) { + C::t('home_visitor')->update_by_uid_vuid($space['uid'], $_G['uid'], array('dateline'=>$_G['timestamp'], 'vusername'=>$is_anonymous ? '' : $_G['username'])); + } + if($_G['timestamp'] - $visitor['dateline'] >= 3600) { + show_credit(); + } + } + updatecreditbyaction('visit', 0, array(), $space['uid']); + } +} + +function show_credit() { + global $_G, $space; + + $showinfo = C::t('home_show')->fetch($space['uid']); + if($showinfo['credit'] > 0) { + $showinfo['unitprice'] = intval($showinfo['unitprice']); + if($showinfo['credit'] <= $showinfo['unitprice']) { + notification_add($space['uid'], 'show', 'show_out'); + C::t('home_show')->delete($space['uid']); + } else { + C::t('home_show')->update_credit_by_uid($space['uid'], -$showinfo['unitprice']); + } + } +} + ?> \ No newline at end of file diff --git a/upload/source/include/space/space_index.php b/upload/source/include/space/space_index.php index f4c3a84e9..3e084ae73 100644 --- a/upload/source/include/space/space_index.php +++ b/upload/source/include/space/space_index.php @@ -69,28 +69,8 @@ if ($_GET['op'] == 'getmusiclist') { dsetcookie('viewid', 'uid_'.$space['uid']); } - if(!$space['self'] && $_G['uid'] && $_GET['additional'] != 'removevlog') { - $visitor = C::t('home_visitor')->fetch_by_uid_vuid($space['uid'], $_G['uid']); - $is_anonymous = empty($_G['cookie']['anonymous_visit_'.$_G['uid'].'_'.$space['uid']]) ? 0 : 1; - if(empty($visitor['dateline'])) { - $setarr = array( - 'uid' => $space['uid'], - 'vuid' => $_G['uid'], - 'vusername' => $is_anonymous ? '' : $_G['username'], - 'dateline' => $_G['timestamp'] - ); - C::t('home_visitor')->insert($setarr, false, true); - show_credit(); - } else { - if($_G['timestamp'] - $visitor['dateline'] >= 300) { - C::t('home_visitor')->update_by_uid_vuid($space['uid'], $_G['uid'], array('dateline'=>$_G['timestamp'], 'vusername'=>$is_anonymous ? '' : $_G['username'])); - } - if($_G['timestamp'] - $visitor['dateline'] >= 3600) { - show_credit(); - } - } - updatecreditbyaction('visit', 0, array(), $space['uid']); - } + show_view(); + if($_GET['additional'] == 'removevlog') { C::t('home_visitor')->delete_by_uid_vuid($space['uid'], $_G['uid']); } @@ -139,18 +119,4 @@ function formatdata($data, $position, $space) { return $list; } -function show_credit() { - global $_G, $space; - - $showinfo = C::t('home_show')->fetch($space['uid']); - if($showinfo['credit'] > 0) { - $showinfo['unitprice'] = intval($showinfo['unitprice']); - if($showinfo['credit'] <= $showinfo['unitprice']) { - notification_add($space['uid'], 'show', 'show_out'); - C::t('home_show')->delete($space['uid']); - } else { - C::t('home_show')->update_credit_by_uid($space['uid'], -$showinfo['unitprice']); - } - } -} ?> \ No newline at end of file diff --git a/upload/source/include/space/space_profile.php b/upload/source/include/space/space_profile.php index bfada2e1c..8f6148f8b 100644 --- a/upload/source/include/space/space_profile.php +++ b/upload/source/include/space/space_profile.php @@ -170,43 +170,7 @@ if(in_array($_G['adminid'], array(1, 2, 3))) { $clist = crime('getactionlist', $space['uid']); } -if(!$space['self'] && $_G['uid'] && $_GET['additional'] != 'removevlog') { - $visitor = C::t('home_visitor')->fetch_by_uid_vuid($space['uid'], $_G['uid']); - $is_anonymous = empty($_G['cookie']['anonymous_visit_'.$_G['uid'].'_'.$space['uid']]) ? 0 : 1; - if(empty($visitor['dateline'])) { - $setarr = array( - 'uid' => $space['uid'], - 'vuid' => $_G['uid'], - 'vusername' => $is_anonymous ? '' : $_G['username'], - 'dateline' => $_G['timestamp'] - ); - C::t('home_visitor')->insert($setarr, false, true); - show_credit(); - } else { - if($_G['timestamp'] - $visitor['dateline'] >= 300) { - C::t('home_visitor')->update_by_uid_vuid($space['uid'], $_G['uid'], array('dateline'=>$_G['timestamp'], 'vusername'=>$is_anonymous ? '' : $_G['username'])); - } - if($_G['timestamp'] - $visitor['dateline'] >= 3600) { - show_credit(); - } - } - updatecreditbyaction('visit', 0, array(), $space['uid']); -} - -function show_credit() { - global $_G, $space; - - $showinfo = C::t('home_show')->fetch($space['uid']); - if($showinfo['credit'] > 0) { - $showinfo['unitprice'] = intval($showinfo['unitprice']); - if($showinfo['credit'] <= $showinfo['unitprice']) { - notification_add($space['uid'], 'show', 'show_out'); - C::t('home_show')->delete($space['uid']); - } else { - C::t('home_show')->update_credit_by_uid($space['uid'], -$showinfo['unitprice']); - } - } -} +show_view(); if(!$_G['privacy']) { if(!$_G['inajax']) { -- Gitee From e61e00db1daceed7de4e405c523c81b43dcb43d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 8 Apr 2020 09:53:59 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=86=BB=E7=BB=93?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=82=AE=E7=AE=B1=E8=A7=A3=E5=86=BB=E5=87=A0?= =?UTF-8?q?=E7=8E=87=E6=80=A7=E5=A4=B1=E8=B4=A5=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/include/misc/misc_emailcheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/source/include/misc/misc_emailcheck.php b/upload/source/include/misc/misc_emailcheck.php index aafc52c3c..12f24c7b2 100644 --- a/upload/source/include/misc/misc_emailcheck.php +++ b/upload/source/include/misc/misc_emailcheck.php @@ -29,7 +29,7 @@ if($uid && isemail($email) && $time > TIMESTAMP - 86400) { } $setarr = array('email'=>$email, 'emailstatus'=>'1'); - if($_G['member']['freeze'] == 2) { + if($member['freeze'] == 2) { $setarr['freeze'] = 0; } loaducenter(); -- Gitee From 36f52975ecbcdcf5c667e4c8c8809d0ef0432741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 8 Apr 2020 10:59:13 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20UCenter=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/uc_server/model/base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload/uc_server/model/base.php b/upload/uc_server/model/base.php index 6e7d4fae2..23edfaa84 100644 --- a/upload/uc_server/model/base.php +++ b/upload/uc_server/model/base.php @@ -279,8 +279,8 @@ class base { $message = $lang[$message] ? str_replace(array_keys($vars), array_values($vars), $lang[$message]) : $message; } $this->view->assign('message', $message); - if(!strpos($redirect, 'sid=') && (!strpos($redirect, 'ttp://'))) { - if(!strpos($redirect, '?')) { + if($redirect != 'BACK' && !preg_match('/^https?:\/\//is', $redirect) && strpos($redirect, 'sid=') === FALSE) { + if(strpos($redirect, '?') === FALSE) { $redirect .= '?sid='.$this->sid; } else { $redirect .= '&sid='.$this->sid; -- Gitee From b70076f54c0b0509a648f9f0984351a08c60766c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Thu, 9 Apr 2020 17:34:23 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=B9=BF=E6=92=AD=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E6=BC=8F=E5=88=A0=E5=B9=BF=E6=92=AD=E9=83=A8=E5=88=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/admincp/admincp_members.php | 14 ++++++++++---- upload/source/class/table/table_home_follow.php | 9 +++++++++ upload/source/function/function_delete.php | 3 +++ upload/source/language/lang_admincp.php | 1 + 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/upload/source/admincp/admincp_members.php b/upload/source/admincp/admincp_members.php index 60e76b544..3f77be220 100644 --- a/upload/source/admincp/admincp_members.php +++ b/upload/source/admincp/admincp_members.php @@ -1456,7 +1456,8 @@ EOT;
  •  $lang[members_ban_delshare]
  •  $lang[members_ban_delavatar]
  •  $lang[members_ban_delcomment]
  • -
  •  $lang[members_ban_delprofile]
  • +
  •  $lang[members_ban_delfollower]
  • +
  •  $lang[members_ban_delprofile]
  • @@ -1745,10 +1746,15 @@ EOF; if(in_array('profile', $_GET['clear'])) { C::t('common_member_profile'.$tableext)->delete($member['uid']); C::t('common_member_profile'.$tableext)->insert(array('uid' => $member['uid'])); - C::t('common_member_field_forum'.$tableext)->update($member['uid'], array('customstatus' => '', 'sightml' => '')); - C::t('common_member_field_home'.$tableext)->update($member['uid'], array('spacename' => '', 'spacedescription' => '')); + C::t('common_member_field_forum'.$tableext)->update($member['uid'], array('customstatus' => '', 'sightml' => '')); + C::t('common_member_field_home'.$tableext)->update($member['uid'], array('spacename' => '', 'spacedescription' => '')); } - + + if(in_array('follower', $_GET['clear'])) { + C::t('home_follow')->delete_by_uid($member['uid']); + C::t('home_follow')->delete_by_followuid($member['uid']); + } + if($membercount) { DB::update('common_member_count'.$tableext, $membercount, "uid='$member[uid]'"); } diff --git a/upload/source/class/table/table_home_follow.php b/upload/source/class/table/table_home_follow.php index fbaca9f1e..f446d1fde 100644 --- a/upload/source/class/table/table_home_follow.php +++ b/upload/source/class/table/table_home_follow.php @@ -138,6 +138,15 @@ class table_home_follow extends discuz_table $this->clear_cache($uid); return DB::query('DELETE FROM %t WHERE uid=%d AND followuid=%d', array($this->_table, $uid, $followuid)); } + + public function delete_by_uid($uids) { + return DB::delete($this->_table, DB::field('uid', $uids)); + } + + public function delete_by_followuid($uids) { + return DB::delete($this->_table, DB::field('followuid', $uids)); + } + } ?> \ No newline at end of file diff --git a/upload/source/function/function_delete.php b/upload/source/function/function_delete.php index f2a97ccce..29fb02680 100644 --- a/upload/source/function/function_delete.php +++ b/upload/source/function/function_delete.php @@ -66,6 +66,9 @@ function deletemember($uids, $delpost = true) { C::t('common_member_forum_buylog')->delete_by_uid($arruids); C::t('forum_threadhidelog')->delete_by_uid($arruids); C::t('common_member_crime')->delete_by_uid($arruids); + C::t('home_follow')->delete_by_uid($arruids); + C::t('home_follow')->delete_by_followuid($arruids); + C::t('home_follow_feed')->delete_by_uid($arruids); foreach(C::t('forum_collectionfollow')->fetch_all_by_uid($arruids) as $follow) { C::t('forum_collection')->update_by_ctid($follow['ctid'], 0, -1); diff --git a/upload/source/language/lang_admincp.php b/upload/source/language/lang_admincp.php index 483277228..3f7b59a23 100644 --- a/upload/source/language/lang_admincp.php +++ b/upload/source/language/lang_admincp.php @@ -3538,6 +3538,7 @@ $lang = array 'members_ban_validity_comment' => '在有效期过后该用户可以自动解除限制,成为普通用户', 'members_ban_delpost' => '帖子', 'members_ban_delfollow' => '广播', + 'members_ban_delfollower' => '广播收听关系', 'members_ban_delblog' => '日志', 'members_ban_delalbum' => '相册', 'members_ban_deldoing' => '记录', -- Gitee From f9316ef30a5317592231b30c7749676e9170ab97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Fri, 10 Apr 2020 17:27:44 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=A0=E9=99=A4UCenter=E7=9A=84=E5=AE=89=E8=A3=85=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/admincp/admincp_index.php | 12 ++++++++---- upload/uc_server/control/admin/frame.php | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/upload/source/admincp/admincp_index.php b/upload/source/admincp/admincp_index.php index 92f7b3f9c..ca7d70c83 100644 --- a/upload/source/admincp/admincp_index.php +++ b/upload/source/admincp/admincp_index.php @@ -11,10 +11,14 @@ if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } -if(@file_exists(DISCUZ_ROOT.'./install/index.php') && !DISCUZ_DEBUG) { - @unlink(DISCUZ_ROOT.'./install/index.php'); - if(@file_exists(DISCUZ_ROOT.'./install/index.php')) { - dexit('Please delete install/index.php via FTP!'); +$sensitivedirs = array('./', './uc_server/', './ucenter/'); + +foreach ($sensitivedirs as $sdir) { + if(@file_exists(DISCUZ_ROOT.$sdir.'install/index.php') && !DISCUZ_DEBUG) { + @unlink(DISCUZ_ROOT.$sdir.'install/index.php'); + if(@file_exists(DISCUZ_ROOT.$sdir.'install/index.php')) { + dexit('Please delete '.$sdir.'install/index.php via FTP!'); + } } } diff --git a/upload/uc_server/control/admin/frame.php b/upload/uc_server/control/admin/frame.php index b32cc0aa7..a5d1714b1 100644 --- a/upload/uc_server/control/admin/frame.php +++ b/upload/uc_server/control/admin/frame.php @@ -51,6 +51,13 @@ class control extends adminbase { $this->view->assign('pms', $pms); $this->view->assign('iframe', getgpc('iframe', 'G')); + if(@file_exists(constant('UC_ROOT').'./install/index.php') && !constant('UC_DEBUG')) { + @unlink(constant('UC_ROOT').'./install/index.php'); + if(@file_exists(constant('UC_ROOT').'./install/index.php')) { + exit('Please delete ./install/index.php via FTP!'); + } + } + $serverinfo = PHP_OS.' / PHP v'.PHP_VERSION; $serverinfo .= @ini_get('safe_mode') ? ' Safe Mode' : NULL; $dbversion = $this->db->result_first("SELECT VERSION()"); -- Gitee From 4c9f9128127ff23c0bec160dbb8e7a76a70e6761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Fri, 10 Apr 2020 21:22:51 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E8=AF=A5=E7=94=A8=E6=88=B7=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E9=80=89=E9=A1=B9=E5=85=A8=E9=80=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=A0=B7=E5=BC=8F=E5=BC=82=E5=B8=B8=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/admincp/admincp_members.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/source/admincp/admincp_members.php b/upload/source/admincp/admincp_members.php index 3f77be220..9f299485d 100644 --- a/upload/source/admincp/admincp_members.php +++ b/upload/source/admincp/admincp_members.php @@ -1446,7 +1446,7 @@ EOT;
      -
    •  $lang[select_all]
    • +
    •  $lang[select_all]
    •  $lang[members_ban_delpost]
    •  $lang[members_ban_delfollow]
    •  $lang[members_ban_postcomment]
    • -- Gitee From 5b48379962d333834dc940fa450148782d0965dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Sun, 12 Apr 2020 15:19:35 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=8D=E6=94=AF=E6=8C=81=E5=A4=A7=E5=86=99?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/function/function_discuzcode.php | 4 ++-- upload/source/function/function_followcode.php | 4 ++-- upload/source/plugin/mobile/discuzcode.func.php | 2 +- upload/uc_client/lib/uccode.class.php | 4 ++-- upload/uc_server/lib/uccode.class.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/upload/source/function/function_discuzcode.php b/upload/source/function/function_discuzcode.php index e0e54f6b1..b1e8cc39c 100644 --- a/upload/source/function/function_discuzcode.php +++ b/upload/source/function/function_discuzcode.php @@ -127,7 +127,7 @@ function discuzcode($message, $smileyoff = false, $bbcodeoff = false, $htmlon = $message = preg_replace_callback("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:)?([^\r\n\[\"']+?))?\](.+?)\[\/url\]/is", 'discuzcode_callback_parseurl_152', $message); } if(strpos($msglower, '[/email]') !== FALSE) { - $message = preg_replace_callback("/\[email(=([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+))?\](.+?)\[\/email\]/is", 'discuzcode_callback_parseemail_14', $message); + $message = preg_replace_callback("/\[email(=([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+))?\](.+?)\[\/email\]/is", 'discuzcode_callback_parseemail_14', $message); } $nest = 0; @@ -379,7 +379,7 @@ function parseattachurl($aid, $ext, $ignoretid = 0) { function parseemail($email, $text) { $text = str_replace('\"', '"', $text); - if(!$email && preg_match("/\s*([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+)\s*/i", $text, $matches)) { + if(!$email && preg_match("/\s*([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\s*/i", $text, $matches)) { $email = trim($matches[0]); return ''.$email.''; } else { diff --git a/upload/source/function/function_followcode.php b/upload/source/function/function_followcode.php index c779f181c..d850f42c8 100644 --- a/upload/source/function/function_followcode.php +++ b/upload/source/function/function_followcode.php @@ -104,7 +104,7 @@ function followcode($message, $tid = 0, $pid = 0, $length = 0, $allowimg = true) $message = preg_replace_callback("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:)?([^\r\n\[\"']+?))?\](.+?)\[\/url\]/is", 'followcode_callback_fparseurl_152', $message); } if(strpos($msglower, '[/email]') !== FALSE) { - $message = preg_replace_callback("/\[email(=([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+))?\](.+?)\[\/email\]/is", 'followcode_callback_fparseemail_14', $message); + $message = preg_replace_callback("/\[email(=([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+))?\](.+?)\[\/email\]/is", 'followcode_callback_fparseemail_14', $message); } $nest = 0; @@ -370,7 +370,7 @@ function fparseemail($email, $text) { $text = str_replace('\"', '"', $text); $html = ''; - if(!$email && preg_match("/\s*([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+)\s*/i", $text, $matches)) { + if(!$email && preg_match("/\s*([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\s*/i", $text, $matches)) { $email = trim($matches[0]); $html = ''.$email.''; } else { diff --git a/upload/source/plugin/mobile/discuzcode.func.php b/upload/source/plugin/mobile/discuzcode.func.php index ed5367c6f..80e3a4b7c 100644 --- a/upload/source/plugin/mobile/discuzcode.func.php +++ b/upload/source/plugin/mobile/discuzcode.func.php @@ -66,7 +66,7 @@ function mobile_discuzcode($param) { $message = preg_replace_callback("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:)?([^\r\n\[\"']+?))?\](.+?)\[\/url\]/is", 'mobile_discuzcode_callback_mobile_parseurl_152', $message); } if(strpos($msglower, '[/email]') !== FALSE) { - $message = preg_replace_callback("/\[email(=([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+))?\](.+?)\[\/email\]/is", 'mobile_discuzcode_callback_mobile_parseemail_14', $message); + $message = preg_replace_callback("/\[email(=([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+))?\](.+?)\[\/email\]/is", 'mobile_discuzcode_callback_mobile_parseemail_14', $message); } $nest = 0; diff --git a/upload/uc_client/lib/uccode.class.php b/upload/uc_client/lib/uccode.class.php index e46edb999..4718954cf 100644 --- a/upload/uc_client/lib/uccode.class.php +++ b/upload/uc_client/lib/uccode.class.php @@ -39,7 +39,7 @@ class uccode { $message = preg_replace_callback("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast){1}:\/\/|www\.)([^\[\"']+?))?\](.+?)\[\/url\]/is", array($this, 'complie_callback_parseurl_15'), $message); } if(strpos($message, '[/email]') !== FALSE) { - $message = preg_replace_callback("/\[email(=([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+))?\](.+?)\[\/email\]/is", array($this, 'complie_callback_parseemail_14'), $message); + $message = preg_replace_callback("/\[email(=([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+))?\](.+?)\[\/email\]/is", array($this, 'complie_callback_parseemail_14'), $message); } $message = str_replace(array( '[/color]', '[/size]', '[/font]', '[/align]', '[b]', '[/b]', @@ -116,7 +116,7 @@ class uccode { function parseemail($email, $text) { $text = str_replace('\"', '"', $text); - if(!$email && preg_match("/\s*([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+)\s*/i", $text, $matches)) { + if(!$email && preg_match("/\s*([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\s*/i", $text, $matches)) { $email = trim($matches[0]); return ''.$email.''; } else { diff --git a/upload/uc_server/lib/uccode.class.php b/upload/uc_server/lib/uccode.class.php index 5cddaf590..012945a3a 100644 --- a/upload/uc_server/lib/uccode.class.php +++ b/upload/uc_server/lib/uccode.class.php @@ -39,7 +39,7 @@ class uccode { $message = preg_replace_callback("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast){1}:\/\/|www\.)([^\[\"']+?))?\](.+?)\[\/url\]/is", array($this, 'complie_callback_parseurl_15'), $message); } if(strpos($message, '[/email]') !== FALSE) { - $message = preg_replace_callback("/\[email(=([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+))?\](.+?)\[\/email\]/is", array($this, 'complie_callback_parseemail_14'), $message); + $message = preg_replace_callback("/\[email(=([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+))?\](.+?)\[\/email\]/is", array($this, 'complie_callback_parseemail_14'), $message); } $message = str_replace(array( '[/color]', '[/size]', '[/font]', '[/align]', '[b]', '[/b]', @@ -116,7 +116,7 @@ class uccode { function parseemail($email, $text) { $text = str_replace('\"', '"', $text); - if(!$email && preg_match("/\s*([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+)\s*/i", $text, $matches)) { + if(!$email && preg_match("/\s*([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\s*/i", $text, $matches)) { $email = trim($matches[0]); return ''.$email.''; } else { -- Gitee From 342bf3c9ad709258a304346e954f7c29f851e813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Mon, 13 Apr 2020 01:19:41 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E4=BC=98=E5=8C=96=20UCenter=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E9=A6=96=E9=A1=B5=E6=B7=BB=E5=8A=A0=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=A3=80=E6=B5=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/uc_server/control/admin/frame.php | 20 +++++++++++++++++++ .../view/default/admin_frame_main.htm | 16 ++++++++++++++- .../uc_server/view/default/templates.lang.php | 6 ++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/upload/uc_server/control/admin/frame.php b/upload/uc_server/control/admin/frame.php index a5d1714b1..070cfcb09 100644 --- a/upload/uc_server/control/admin/frame.php +++ b/upload/uc_server/control/admin/frame.php @@ -71,12 +71,14 @@ class control extends adminbase { $dbsize = $dbsize ? $this->_sizecount($dbsize) : $lang['unknown']; $magic_quote_gpc = get_magic_quotes_gpc() ? 'On' : 'Off'; $allow_url_fopen = ini_get('allow_url_fopen') ? 'On' : 'Off'; + $envstatus = $this->_get_uc_envstatus(); $this->view->assign('serverinfo', $serverinfo); $this->view->assign('fileupload', $fileupload); $this->view->assign('dbsize', $dbsize); $this->view->assign('dbversion', $dbversion); $this->view->assign('magic_quote_gpc', $magic_quote_gpc); $this->view->assign('allow_url_fopen', $allow_url_fopen); + $this->view->assign('envstatus', $envstatus); $this->view->display('admin_frame_main'); } @@ -190,6 +192,24 @@ class control extends adminbase { return 'update='.rawurlencode(base64_encode($data)).'&md5hash='.substr(md5($_SERVER['HTTP_USER_AGENT'].implode('', $update).$this->time), 8, 8).'×tamp='.$this->time; } + function _get_uc_envstatus() { + $version = constant('UC_SERVER_VERSION'); + $now_ver = array('PHP' => constant('PHP_VERSION'), 'MySQL' => $this->db->result_first("SELECT VERSION()"), 'gethostbyname' => function_exists('gethostbyname'), 'file_get_contents' => function_exists('file_get_contents'), 'xml_parser_create' => function_exists('xml_parser_create'), + 'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => (function_exists('gd_info') ? preg_replace('/[^0-9.]+/', '', gd_info()['GD Version']) : false)); + $req_ver = array('PHP' => '5.3', 'MySQL' => '5.0', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '1.0'); + $sug_ver = array('PHP' => '7.1', 'MySQL' => '5.7', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '2.0'); + foreach ($now_ver as $key => $value) { + if($req_ver[$key] === true) { + if (!$value) { + return array('status' => 0, 'req' => $key, 'version' => $version); + } + } else if (version_compare($value, $req_ver[$key], '<')) { + return array('status' => 0, 'req' => $key, 'now_ver' => $value, 'sug_ver' => $sug_ver[$key], 'req_ver' => $req_ver[$key], 'version' => $version); + } + } + return array('status' => 1, 'version' => $version); + } + } ?> \ No newline at end of file diff --git a/upload/uc_server/view/default/admin_frame_main.htm b/upload/uc_server/view/default/admin_frame_main.htm index 586558504..a07790c1a 100644 --- a/upload/uc_server/view/default/admin_frame_main.htm +++ b/upload/uc_server/view/default/admin_frame_main.htm @@ -33,7 +33,21 @@
    - + +

    {lang home_envstatus}

    +
      + +
    • {lang envstatus_result}:{lang envstatus_ok}
    • + +
    • {lang envstatus_result}: + + {lang envstatus_ver_too_low} + + {lang envstatus_not_found} + +
    • + +

    {lang home_env}

    • {lang home_version}:UCenter {UC_SERVER_VERSION} Release {UC_SERVER_RELEASE} {lang view_new_version} diff --git a/upload/uc_server/view/default/templates.lang.php b/upload/uc_server/view/default/templates.lang.php index 82ec27e4c..e57bb196d 100644 --- a/upload/uc_server/view/default/templates.lang.php +++ b/upload/uc_server/view/default/templates.lang.php @@ -448,6 +448,7 @@ $languages = array( 'home_member_count' => '用户总数', 'home_app_count' => '应用总数', 'home_env' => '系统信息', + 'home_envstatus' => '运行环境检测', 'home_team' => 'UCenter 开发团队', 'admin_add_succeed' => '添加 $addname 为管理员成功', @@ -498,4 +499,9 @@ $languages = array( 'app_allowips' => '允许的IP', 'app_allowips_comment' => '限定终端访问的IP, 设置哪些IP可以访问Ucenter 的数据接口', + 'envstatus_result' => '检测结果', + 'envstatus_ver_too_low' => '您当前系统环境内的 $envstatus[req] 版本 ($envstatus[now_ver]) 过低,程序无法按预期正常运行。我们强烈建议您升级到 $envstatus[sug_ver] 版本,程序正常运行最低要求为 $envstatus[req_ver] 版本。', + 'envstatus_not_found' => '您当前系统环境内未安装或开启 $envstatus[req] 模块,程序无法按预期正常运行。我们强烈建议您安装或开启此模块,以满足程序正常运行的最低要求。', + 'envstatus_ok' => '您当前系统环境适合当前版本的 UCenter $envstatus[version] 。', + ); \ No newline at end of file -- Gitee From 92a7c9b7aa04a1db38d37c79da2f66469894fefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Mon, 13 Apr 2020 01:49:09 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20UCenter=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E5=85=B6=E4=BB=96=E7=AE=A1=E7=90=86=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=BC=82=E5=B8=B8=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/uc_server/control/admin/frame.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upload/uc_server/control/admin/frame.php b/upload/uc_server/control/admin/frame.php index 070cfcb09..140a3bbcc 100644 --- a/upload/uc_server/control/admin/frame.php +++ b/upload/uc_server/control/admin/frame.php @@ -97,7 +97,8 @@ class control extends adminbase { 'XSPACE' => 'admincp.php', 'SUPEV' => 'admincp.php', 'ECSHOP' => 'admin/index.php', - 'ECMALL' => 'admin.php' + 'ECMALL' => 'admin.php', + 'DISCUZX' => 'admin.php' ); $admincp = ''; if(is_array($applist)) { -- Gitee From 12135028c2aadc53f5fb91feac35589da84c157b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 15 Apr 2020 19:49:36 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E5=88=A0=E9=99=A4=20=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E8=AF=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/include/misc/misc_debug.php | 81 ----------------------- 1 file changed, 81 deletions(-) delete mode 100644 upload/source/include/misc/misc_debug.php diff --git a/upload/source/include/misc/misc_debug.php b/upload/source/include/misc/misc_debug.php deleted file mode 100644 index 7530642c1..000000000 --- a/upload/source/include/misc/misc_debug.php +++ /dev/null @@ -1,81 +0,0 @@ - - .tclass, .tclass2 { - text-align:left;width:900px;border:0;border-collapse:collapse;margin-bottom:5px;table-layout: fixed; word-wrap: break-word;background:#FFF;} - .tclass table, .tclass2 table {width:100%;border:0;table-layout: fixed; word-wrap: break-word;} - .tclass table td, .tclass2 table td {border-bottom:0;border-right:0;border-color: #ADADAD;} - .tclass th, .tclass2 th {border:1px solid #000;background:#CCC;padding: 2px;font-family: Courier New, Arial;font-size: 11px;} - .tclass td, .tclass2 td {border:1px solid #000;background:#FFFCCC;padding: 2px;font-family: Courier New, Arial;font-size: 11px;} - .tclass2 th {background:#D5EAEA;} - .tclass2 td {background:#FFFFFF;} - .firsttr td {border-top:0;} - .firsttd {border-left:none !important;} - .bold {font-weight:bold;} - -
      -EOF; - $class = 'tclass2'; - if(empty($_G['debug_query'])) $_G['debug_query'] = array(); - foreach ($_G['debug_query'] as $dkey => $debug) { - ($class == 'tclass')?$class = 'tclass2':$class = 'tclass'; - echo ''; - if(!empty($debug['info'])) { - echo ''; - } - if(!empty($debug['explain'])) { - echo ''; - } - echo '
      '.($dkey+1).''.$debug['time'].' ms'. dhtmlspecialchars($debug['sql']).'
      Info'.$debug['info'].'
      Explain'; - foreach ($debug['explain'] as $ekey => $explain) { - ($ekey == 'id')?$tdclass = ' class="firsttd"':$tdclass=''; - if(empty($explain)) $explain = '-'; - echo ''.$explain.''; - } - echo '
      idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
      '; - } - if($values = $_COOKIE) { - ($class == 'tclass')?$class = 'tclass2':$class = 'tclass'; - $i = 1; - echo ''; - foreach ($values as $ckey => $cookie) { - echo ''; - $i++; - } - echo '
      '.$i.'$_COOKIE[\''.$ckey.'\']'.$cookie.'
      '; - } - if($files = get_included_files()) { - ($class == 'tclass')?$class = 'tclass2':$class = 'tclass'; - echo ''; - foreach ($files as $fkey => $file) { - echo ''; - } - echo '
      '.($fkey+1).''.$file.'
      '; - } - if($values = $_SERVER) { - ($class == 'tclass')?$class = 'tclass2':$class = 'tclass'; - $i = 1; - echo ''; - foreach ($values as $ckey => $cookie) { - echo ''; - $i++; - } - echo '
      '.$i.'$_SERVER[\''.$ckey.'\']'.$cookie.'
      '; - } - echo '
      '; -} - -?> \ No newline at end of file -- Gitee From 7219d1332ed23642614d74df34afffced7393ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 15 Apr 2020 19:50:55 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/plugin/mobile/qrcode.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/source/plugin/mobile/qrcode.class.php b/upload/source/plugin/mobile/qrcode.class.php index ba3b67729..b3aedb94c 100644 --- a/upload/source/plugin/mobile/qrcode.class.php +++ b/upload/source/plugin/mobile/qrcode.class.php @@ -844,7 +844,7 @@ class QRinputItem { public function encodeModeKanji($version) { try { - $bs = new QRbitrtream(); + $bs = new QRbitstream(); $bs->appendNum(4, 0x8); $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int) ($this->size / 2)); -- Gitee From 2e5dd3dd72419f010054b82a81527e874a28322b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 22 Apr 2020 21:41:09 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/uc_server/model/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/uc_server/model/base.php b/upload/uc_server/model/base.php index 23edfaa84..a93dbb066 100644 --- a/upload/uc_server/model/base.php +++ b/upload/uc_server/model/base.php @@ -447,7 +447,7 @@ class base { (!defined('UC_COOKIEPATH')) && define('UC_COOKIEPATH', '/'); (!defined('UC_COOKIEDOMAIN')) && define('UC_COOKIEDOMAIN', ''); - if($value == '' || $life < 0) { + if($value === '' || $life < 0) { $value = ''; $life = -1; } -- Gitee