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;