From 81f46ae06faa664f1db5f42ee4bce2a8786384b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Sat, 15 Mar 2014 22:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B8=A5=E7=AD=89=E4=BA=8E?= =?UTF-8?q?=E6=9D=A5=E4=BF=AE=E5=A4=8D=E6=9F=90=E4=BA=9B=E6=9E=81=E7=AB=AF?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E5=AF=86=E7=A0=81=E5=8F=AF=E8=A2=AB?= =?UTF-8?q?=E7=BB=95=E8=BF=87=E7=9A=84=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Typecho/Common.php | 4 ++-- var/Widget/Abstract/Contents.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php index 3f2da629..3642f327 100644 --- a/var/Typecho/Common.php +++ b/var/Typecho/Common.php @@ -967,9 +967,9 @@ EOF; { if ('$T$' == substr($to, 0, 3)) { $salt = substr($to, 3, 9); - return self::hash($from, $salt) == $to; + return self::hash($from, $salt) === $to; } else { - return md5($from) == $to; + return md5($from) === $to; } } diff --git a/var/Widget/Abstract/Contents.php b/var/Widget/Abstract/Contents.php index 5c4bc757..27da5841 100644 --- a/var/Widget/Abstract/Contents.php +++ b/var/Widget/Abstract/Contents.php @@ -717,7 +717,7 @@ class Widget_Abstract_Contents extends Widget_Abstract /** 处理密码保护流程 */ if (!empty($value['password']) && - $value['password'] != Typecho_Cookie::get('protectPassword') && + $value['password'] !== Typecho_Cookie::get('protectPassword') && $value['authorId'] != $this->user->uid && !$this->user->pass('editor', true)) { $value['hidden'] = true;