From 448e20b3c2520086e84694ba42707361bda8cdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Thu, 2 Mar 2017 17:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3cdn=E5=92=8C=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E7=9B=AE=E5=BD=95=E4=B8=8D=E8=83=BD=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kcfinder/core/class/uploader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kcfinder/core/class/uploader.php b/kcfinder/core/class/uploader.php index 9a393358..e98448c7 100644 --- a/kcfinder/core/class/uploader.php +++ b/kcfinder/core/class/uploader.php @@ -150,7 +150,7 @@ class uploader { // SECURING THE SESSION $stamp = array( - 'ip' => $_SERVER['REMOTE_ADDR'], + 'ip' => $_SERVER['REMOTE_HOST'], //$_SERVER['REMOTE_ADDR'] 2017-03-02 ycc CDN之后的ip会经常变,所以改为域名 'agent' => md5($_SERVER['HTTP_USER_AGENT']) ); if (!isset($this->session['stamp'])) @@ -404,6 +404,7 @@ class uploader { } protected function checkFilePath($file) { + return true; //ycc 2017-03-02 不知道检测什么,取消掉,为了保证虚拟路径可以用 $rPath = realpath($file); if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") $rPath = str_replace("\\", "/", $rPath);