From c54521cc224ca22999830755cc4e9222de633635 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, 3 Feb 2021 17:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9C=A8=20IE=2011=20?= =?UTF-8?q?=E5=92=8C=20=E8=80=81=20Edge=20=E4=B8=8A=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B9=B1=E7=A0=81=E7=9A=84=20Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/include/misc/misc_counter.php | 68 ------------------- upload/source/include/spacecp/spacecp_pm.php | 2 +- .../source/module/forum/forum_attachment.php | 2 +- upload/source/module/forum/forum_misc.php | 2 +- .../module/portal/portal_attachment.php | 2 +- 5 files changed, 4 insertions(+), 72 deletions(-) delete mode 100644 upload/source/include/misc/misc_counter.php diff --git a/upload/source/include/misc/misc_counter.php b/upload/source/include/misc/misc_counter.php deleted file mode 100644 index 1853a1df6..000000000 --- a/upload/source/include/misc/misc_counter.php +++ /dev/null @@ -1,68 +0,0 @@ - \ No newline at end of file diff --git a/upload/source/include/spacecp/spacecp_pm.php b/upload/source/include/spacecp/spacecp_pm.php index 9a24ef1b2..fcce61803 100644 --- a/upload/source/include/spacecp/spacecp_pm.php +++ b/upload/source/include/spacecp/spacecp_pm.php @@ -501,7 +501,7 @@ if($_GET['op'] == 'checknewpm') { $contents = nl2br($contents); $filesize = strlen($contents); - $filename = '"'.(strtolower(CHARSET) == 'utf-8' && strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') ? urlencode($filename) : $filename).'"'; + $filename = '"'.(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Trident') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge')) ? urlencode($filename) : $filename).'"'; dheader('Date: '.gmdate('D, d M Y H:i:s', $val['dateline']).' GMT'); dheader('Last-Modified: '.gmdate('D, d M Y H:i:s', $val['dateline']).' GMT'); diff --git a/upload/source/module/forum/forum_attachment.php b/upload/source/module/forum/forum_attachment.php index 354a3df62..76130bcd8 100644 --- a/upload/source/module/forum/forum_attachment.php +++ b/upload/source/module/forum/forum_attachment.php @@ -244,7 +244,7 @@ $mimetype = ext_to_mimetype($attach['filename']); $filesize = !$attach['remote'] ? filesize($filename) : $attach['filesize']; // 如果range_end没有传入,更新range_end if ($has_range_header && !$range_end) $range_end = $filesize - 1; -$attach['filename'] = '"'.(strtolower(CHARSET) == 'utf-8' && strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') ? urlencode($attach['filename']) : $attach['filename']).'"'; +$attach['filename'] = '"'.(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Trident') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge')) ? urlencode($attach['filename']) : $attach['filename']).'"'; dheader('Date: '.gmdate('D, d M Y H:i:s', $attach['dateline']).' GMT'); dheader('Last-Modified: '.gmdate('D, d M Y H:i:s', $attach['dateline']).' GMT'); diff --git a/upload/source/module/forum/forum_misc.php b/upload/source/module/forum/forum_misc.php index 5c94bb6d7..9e5ab49ce 100644 --- a/upload/source/module/forum/forum_misc.php +++ b/upload/source/module/forum/forum_misc.php @@ -425,7 +425,7 @@ IconIndex=1 $filename = $_G['setting']['bbname'].'.url'; } - if(!strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { + if(!(strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Trident') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge'))) { $filename = diconv($filename, CHARSET, 'UTF-8'); } else { $filename = diconv($filename, CHARSET, 'GBK'); diff --git a/upload/source/module/portal/portal_attachment.php b/upload/source/module/portal/portal_attachment.php index 4033928a7..cf0b9a22a 100644 --- a/upload/source/module/portal/portal_attachment.php +++ b/upload/source/module/portal/portal_attachment.php @@ -62,7 +62,7 @@ if($operation == 'delete') { } $filesize = $attach['filesize']; - $attach['filename'] = '"'.(strtolower(CHARSET) == 'utf-8' && strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') ? urlencode($attach['filename']) : $attach['filename']).'"'; + $attach['filename'] = '"'.(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Trident') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge')) ? urlencode($attach['filename']) : $attach['filename']).'"'; dheader('Date: '.gmdate('D, d M Y H:i:s', $attach['dateline']).' GMT'); dheader('Last-Modified: '.gmdate('D, d M Y H:i:s', $attach['dateline']).' GMT'); -- Gitee