From 0d30d33aa3db1108fe3f095576d5f07a7801c056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Mon, 10 Mar 2014 21:05:20 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B3=84=E9=9C=B2?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=9A=84=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/plugins/HelloWorld/Plugin.php | 1 + var/IXR/Client.php | 21 ------------------- var/IXR/ClientMulticall.php | 4 +--- var/IXR/Exception.php | 1 + var/IXR/IntrospectionServer.php | 4 +--- var/IXR/Server.php | 18 ---------------- var/Typecho/Db/Adapter/Exception.php | 1 + var/Typecho/Db/Adapter/Mysql.php | 1 + var/Typecho/Db/Adapter/Pdo.php | 1 + var/Typecho/Db/Adapter/Pdo/Mysql.php | 1 + var/Typecho/Db/Adapter/Pdo/Pgsql.php | 1 + var/Typecho/Db/Adapter/Pdo/SQLite.php | 1 + var/Typecho/Db/Adapter/Pgsql.php | 1 + var/Typecho/Db/Adapter/SQLite.php | 1 + var/Typecho/Db/Exception.php | 1 + var/Typecho/Db/Query/Exception.php | 1 + var/Typecho/Http/Client/Adapter/Curl.php | 1 + var/Typecho/Http/Client/Adapter/Socket.php | 1 + var/Typecho/Http/Client/Exception.php | 1 + var/Typecho/Plugin/Exception.php | 1 + var/Typecho/Router/Exception.php | 1 + var/Typecho/Widget/Exception.php | 1 + var/Typecho/Widget/Helper/Form.php | 1 + var/Typecho/Widget/Helper/Form/Element.php | 1 + .../Widget/Helper/Form/Element/Checkbox.php | 1 + .../Widget/Helper/Form/Element/Fake.php | 1 + .../Widget/Helper/Form/Element/Hidden.php | 1 + .../Widget/Helper/Form/Element/Password.php | 1 + .../Widget/Helper/Form/Element/Radio.php | 1 + .../Widget/Helper/Form/Element/Select.php | 1 + .../Widget/Helper/Form/Element/Submit.php | 1 + .../Widget/Helper/Form/Element/Text.php | 1 + .../Widget/Helper/Form/Element/Textarea.php | 1 + .../Widget/Helper/PageNavigator/Box.php | 1 + .../Widget/Helper/PageNavigator/Classic.php | 1 + var/Widget/Abstract.php | 1 + var/Widget/Abstract/Comments.php | 1 + var/Widget/Abstract/Contents.php | 1 + var/Widget/Abstract/Metas.php | 1 + var/Widget/Abstract/Options.php | 1 + var/Widget/Abstract/Users.php | 1 + var/Widget/Ajax.php | 1 + var/Widget/Archive.php | 1 + var/Widget/Comments/Admin.php | 1 + var/Widget/Comments/Archive.php | 1 + var/Widget/Comments/Edit.php | 1 + var/Widget/Comments/Ping.php | 1 + var/Widget/Comments/Recent.php | 1 + var/Widget/Contents/Attachment/Admin.php | 1 + var/Widget/Contents/Attachment/Edit.php | 1 + var/Widget/Contents/Attachment/Related.php | 1 + var/Widget/Contents/Attachment/Unattached.php | 1 + var/Widget/Contents/Page/Admin.php | 1 + var/Widget/Contents/Page/Edit.php | 1 + var/Widget/Contents/Page/List.php | 1 + var/Widget/Contents/Post/Admin.php | 1 + var/Widget/Contents/Post/Date.php | 1 + var/Widget/Contents/Post/Edit.php | 1 + var/Widget/Contents/Post/Recent.php | 1 + var/Widget/Contents/Related.php | 1 + var/Widget/Contents/Related/Author.php | 1 + var/Widget/Do.php | 1 + var/Widget/ExceptionHandle.php | 1 + var/Widget/Feedback.php | 1 + var/Widget/Init.php | 1 + var/Widget/Login.php | 1 + var/Widget/Logout.php | 1 + var/Widget/Menu.php | 1 + var/Widget/Metas/Category/Admin.php | 1 + var/Widget/Metas/Category/Edit.php | 1 + var/Widget/Metas/Category/List.php | 1 + var/Widget/Metas/Tag/Admin.php | 1 + var/Widget/Metas/Tag/Cloud.php | 1 + var/Widget/Metas/Tag/Edit.php | 1 + var/Widget/Notice.php | 1 + var/Widget/Options.php | 1 + var/Widget/Options/Discussion.php | 1 + var/Widget/Options/General.php | 1 + var/Widget/Options/Permalink.php | 1 + var/Widget/Options/Reading.php | 1 + var/Widget/Plugins/Config.php | 1 + var/Widget/Plugins/Edit.php | 1 + var/Widget/Plugins/List.php | 1 + var/Widget/Plugins/List/Activated.php | 1 + var/Widget/Plugins/List/Deactivated.php | 1 + var/Widget/Register.php | 1 + var/Widget/Security.php | 1 + var/Widget/Service.php | 1 + var/Widget/Stat.php | 1 + var/Widget/Themes/Config.php | 1 + var/Widget/Themes/Edit.php | 1 + var/Widget/Themes/Files.php | 1 + var/Widget/Themes/List.php | 1 + var/Widget/Upgrade.php | 1 + var/Widget/Upload.php | 1 + var/Widget/User.php | 1 + var/Widget/Users/Admin.php | 1 + var/Widget/Users/Author.php | 1 + var/Widget/Users/Edit.php | 1 + var/Widget/Users/Profile.php | 1 + var/Widget/XmlRpc.php | 1 + 101 files changed, 99 insertions(+), 45 deletions(-) diff --git a/usr/plugins/HelloWorld/Plugin.php b/usr/plugins/HelloWorld/Plugin.php index d71e1f8b..6425858a 100644 --- a/usr/plugins/HelloWorld/Plugin.php +++ b/usr/plugins/HelloWorld/Plugin.php @@ -1,4 +1,5 @@ htmlspecialchars) @@ -7,9 +8,6 @@ Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php */ -/** IXR_Clinet */ -require_once 'IXR/Clinet.php'; - /** * IXR客户端 * diff --git a/var/IXR/Exception.php b/var/IXR/Exception.php index 9fad4473..682c42a2 100644 --- a/var/IXR/Exception.php +++ b/var/IXR/Exception.php @@ -1,4 +1,5 @@ htmlspecialchars) diff --git a/var/IXR/IntrospectionServer.php b/var/IXR/IntrospectionServer.php index b8664c97..664302c9 100644 --- a/var/IXR/IntrospectionServer.php +++ b/var/IXR/IntrospectionServer.php @@ -1,4 +1,5 @@ htmlspecialchars) @@ -7,9 +8,6 @@ Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php */ -/** IXR_Server */ -require_once 'IXR/Server.php'; - /** * IXR服务器 * diff --git a/var/IXR/Server.php b/var/IXR/Server.php index a7fce2b3..b3d47a2b 100644 --- a/var/IXR/Server.php +++ b/var/IXR/Server.php @@ -7,24 +7,6 @@ Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php */ -/** IXR值 */ -require_once 'IXR/Value.php'; - -/** IXR消息 */ -require_once 'IXR/Message.php'; - -/** IXR请求体 */ -require_once 'IXR/Request.php'; - -/** IXR错误 */ -require_once 'IXR/Error.php'; - -/** IXR日期 */ -require_once 'IXR/Date.php'; - -/** IXR Base64编码 */ -require_once 'IXR/Base64.php'; - /** * IXR服务器 * diff --git a/var/Typecho/Db/Adapter/Exception.php b/var/Typecho/Db/Adapter/Exception.php index fc628e2a..d4f51884 100644 --- a/var/Typecho/Db/Adapter/Exception.php +++ b/var/Typecho/Db/Adapter/Exception.php @@ -1,4 +1,5 @@ Date: Mon, 10 Mar 2014 21:14:50 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3waring=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E8=B7=AF=E5=BE=84=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Widget/User.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/Widget/User.php b/var/Widget/User.php index 2eab1369..89fb42aa 100644 --- a/var/Widget/User.php +++ b/var/Widget/User.php @@ -124,6 +124,10 @@ class Widget_User extends Typecho_Widget ->where((strpos($name, '@') ? 'mail' : 'name') . ' = ?', $name) ->limit(1)); + if (empty($user)) { + return false; + } + $hashValidate = $this->pluginHandle()->trigger($hashPluggable)->hashValidate($password, $user['password']); if (!$hashPluggable) { $hashValidate = Typecho_Common::hashValidate($password, $user['password']); From 98d2433620fe4770fa409c28dd25e468d4438a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Mon, 10 Mar 2014 21:31:07 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=B2=A1=E6=9C=89=E8=BF=87=E6=BB=A4=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8D=EF=BC=8C=E5=AF=BC=E8=87=B4=E7=9A=84xss?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E5=9E=8B=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Widget/Login.php | 1 + 1 file changed, 1 insertion(+) diff --git a/var/Widget/Login.php b/var/Widget/Login.php index d3de316c..6117b2c9 100644 --- a/var/Widget/Login.php +++ b/var/Widget/Login.php @@ -37,6 +37,7 @@ class Widget_Login extends Widget_Abstract_Users implements Widget_Interface_Do /** 初始化验证类 */ $validator = new Typecho_Validate(); $validator->addRule('name', 'required', _t('请输入用户名')); + $validator->addRule('name', 'xssCheck', _t('请不要使用特殊字符')); $validator->addRule('password', 'required', _t('请输入密码')); /** 截获验证异常 */ From c3e8abe333de6d4d1306e10877d974d7ac50a02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Tue, 11 Mar 2014 09:45:24 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=99=90=E5=88=B6=E9=80=A0=E6=88=90=E5=9C=A8?= =?UTF-8?q?=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8B=E7=9A=84=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/themes/default/404.php | 1 + usr/themes/default/archive.php | 1 + usr/themes/default/comments.php | 1 + usr/themes/default/footer.php | 2 +- usr/themes/default/functions.php | 1 + usr/themes/default/header.php | 1 + usr/themes/default/index.php | 3 ++- usr/themes/default/page.php | 1 + usr/themes/default/post.php | 1 + usr/themes/default/sidebar.php | 1 + 10 files changed, 11 insertions(+), 2 deletions(-) diff --git a/usr/themes/default/404.php b/usr/themes/default/404.php index db69e372..6a2a2105 100644 --- a/usr/themes/default/404.php +++ b/usr/themes/default/404.php @@ -1,3 +1,4 @@ + need('header.php'); ?>
diff --git a/usr/themes/default/archive.php b/usr/themes/default/archive.php index 25d2a7d6..cc5f9911 100644 --- a/usr/themes/default/archive.php +++ b/usr/themes/default/archive.php @@ -1,3 +1,4 @@ + need('header.php'); ?>
diff --git a/usr/themes/default/comments.php b/usr/themes/default/comments.php index cbd4fe7f..709d0b91 100644 --- a/usr/themes/default/comments.php +++ b/usr/themes/default/comments.php @@ -1,3 +1,4 @@ +
comments()->to($comments); ?> have()): ?> diff --git a/usr/themes/default/footer.php b/usr/themes/default/footer.php index eb9a9ad1..347cd197 100644 --- a/usr/themes/default/footer.php +++ b/usr/themes/default/footer.php @@ -1,5 +1,5 @@ + -
diff --git a/usr/themes/default/functions.php b/usr/themes/default/functions.php index 0e63bb92..77b4855f 100644 --- a/usr/themes/default/functions.php +++ b/usr/themes/default/functions.php @@ -1,4 +1,5 @@ diff --git a/usr/themes/default/index.php b/usr/themes/default/index.php index 0fb21899..495d426a 100644 --- a/usr/themes/default/index.php +++ b/usr/themes/default/index.php @@ -7,7 +7,8 @@ * @version 1.2 * @link http://typecho.org */ - + +if (!defined('__TYPECHO_ROOT_DIR__')) exit; $this->need('header.php'); ?> diff --git a/usr/themes/default/page.php b/usr/themes/default/page.php index b0f365a1..8f1cd6f6 100644 --- a/usr/themes/default/page.php +++ b/usr/themes/default/page.php @@ -1,3 +1,4 @@ + need('header.php'); ?>
diff --git a/usr/themes/default/post.php b/usr/themes/default/post.php index fe0d2e72..3732c9ff 100644 --- a/usr/themes/default/post.php +++ b/usr/themes/default/post.php @@ -1,3 +1,4 @@ + need('header.php'); ?>
diff --git a/usr/themes/default/sidebar.php b/usr/themes/default/sidebar.php index d10e8aad..4901508c 100644 --- a/usr/themes/default/sidebar.php +++ b/usr/themes/default/sidebar.php @@ -1,3 +1,4 @@ +