<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT狂人的博客 &#187; Wordpress</title>
	<atom:link href="http://www.yinzhili.com/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yinzhili.com</link>
	<description>世界上有10种人:一种是懂二进制的，另一种是不懂的。</description>
	<lastBuildDate>Thu, 22 Jul 2010 03:51:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>使用htaccess来增强Wordpress安全性</title>
		<link>http://www.yinzhili.com/2010/07/hardening-wordpress-with-htaccess.html</link>
		<comments>http://www.yinzhili.com/2010/07/hardening-wordpress-with-htaccess.html#comments</comments>
		<pubDate>Tue, 06 Jul 2010 06:47:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[译文]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[安全性]]></category>

		<guid isPermaLink="false">http://www.yinzhili.com/?p=246</guid>
		<description><![CDATA[这是一篇原创译文，转载请注明出处，原文请单击<a href="http://blogsecurity.net/wordpress/article-210607" target="_blank">这里</a>查看。
本文将讨论一些有关于增强Wordpress博客安全性的安全技术，这些技术在那些托管的环境下尤为有效。 
首先我要说明的是本向导并不适合所有人，并且有可能影响一些第三方插件或者模板。 
情况还没有想象中的糟糕，如果你能够应用本向导中的知识，你就可[......]<p class='read-more'><a href='http://www.yinzhili.com/2010/07/hardening-wordpress-with-htaccess.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><span style="color: #3366ff;">这是一篇原创译文，转载请注明出处，原文请单击</span><a href="http://blogsecurity.net/wordpress/article-210607" target="_blank"><span style="color: #3366ff;">这里</span></a><span style="color: #3366ff;">查看。</span></p>
<p>本文将讨论一些有关于增强Wordpress博客安全性的安全技术，这些技术在那些托管的环境下尤为有效。 </p>
<p>首先我要说明的是本向导并不适合所有人，并且有可能影响一些第三方插件或者模板。 </p>
<p>情况还没有想象中的糟糕，如果你能够应用本向导中的知识，你就可以显著地增强你的博客的安全性。包括暴力攻击、插件枚举、目录列表、敏感信息泄露以及文件包含漏洞等类型的攻击都能被阻止。 </p>
<p>重要说明：请确保在操作之前备份好了您的Wordpress文件和数据库。 </p>
<p>步骤1 &#8211; 限制wp-content 和wp-includes</p>
<p>使用 .htaccess 中的 &lt;file&gt; 指令，我们可以限制访问除图像、样式表以及JavaScript之外的文件。这里的 .htaccess 文件看起来如下：</p>
<p>Order Allow,Deny<br />
Deny from all<br />
&lt;Files ~ &#8220;\.(css|jpe?g|png|gif|js)$&#8221;&gt;<br />
 Allow from all<br />
&lt;/Files&gt;</p>
<p>如果你想要允许特定的插件如Democracy被访问，我们可以将下面的指令追加到 wp-content/.htaccess 文件末尾：</p>
<p>&lt;Files &#8220;democracy.php&#8221;&gt;<br />
 Allow from all<br />
&lt;/Files&gt;</p>
<p>将以上内容保存到您的 wp-content 和 wp-includes 目录下的 .htaccess 文件中。补充说明一下，您还可以允许指定的某文件被访问，这样能使您的插件和/或模板正常工作，如果需要的话。这是一个更简洁的办法。</p>
<p>步骤2 &#8211; 限制访问 wp-admin</p>
<p>要限制访问 wp-admin，您有两种选择。选择以下方法中的一种，把包含相应指令的 .htaccess 文件放到您的 wp-admin 目录下。</p>
<p>您可以限制 IP:</p>
<p>order deny,allow<br />
allow from a.b.c.d # 这里的a.b.c.d就是您的静态 IP<br />
deny from all</p>
<p>以上代码将阻止那些IP地址不是 a.b.c.d 的访客通过浏览器访问此目录中的任何文件。这里的“a.b.c.d”应当与您的静态IP地址一致。</p>
<p>或者您还可以通过密码来限制：</p>
<p>AuthUserFile /etc/httpd/htpasswd<br />
AuthType Basic<br />
AuthName &#8220;restricted&#8221;<br />
Order Deny,Allow<br />
Deny from all<br />
Require valid-user<br />
Satisfy any</p>
<p>这里有一个bug。以上的规则代码会引发一个问题，如果那些在您的博客上发表评论的人没有输入邮箱地址，那么就会弹出一个输入密码的输入框。这是因为某些样式表和图片文件也位于wp-admin 目录之中。为了解决这一问题，我们可以将以上的代码包含于文件指令中，这个文件指令只会阻止 .php 文件被访问，不会阻止其它文件。这仍然能够阻止许多直接的攻击，并且同时还提供了许多额外的特性。下面是一个改进版：</p>
<p>&lt;Files ~ &#8220;\.(php)$&#8221;&gt;<br />
AuthUserFile /etc/httpd/htpasswd<br />
AuthType Basic<br />
AuthName &#8220;restricted&#8221;<br />
Order Deny,Allow<br />
Deny from all<br />
Require valid-user<br />
Satisfy any<br />
&lt;/Files&gt;</p>
<p>就是这样，有了这些措施，您的博客将更加安全。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yinzhili.com/2010/07/hardening-wordpress-with-htaccess.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress常用时间参数</title>
		<link>http://www.yinzhili.com/2010/01/wordpress-time-parameters.html</link>
		<comments>http://www.yinzhili.com/2010/01/wordpress-time-parameters.html#comments</comments>
		<pubDate>Sat, 02 Jan 2010 05:01:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.yinzhili.com/?p=161</guid>
		<description><![CDATA[使用Wordpress国外主题的时候常常要改动其中的时间参数，因为老外他们使用的时间格式和我们大不一样，比如说同样是一个日期：2010年1月2日，美国英语里面可能写成 Jan 2nd 2010，英国英语里则是 2nd Jan 2010，而我们汉语里是 2010年1月2日。好在Wordpress提供了[......]<p class='read-more'><a href='http://www.yinzhili.com/2010/01/wordpress-time-parameters.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>使用Wordpress国外主题的时候常常要改动其中的时间参数，因为老外他们使用的时间格式和我们大不一样，比如说同样是一个日期：2010年1月2日，美国英语里面可能写成 Jan 2nd 2010，英国英语里则是 2nd Jan 2010，而我们汉语里是 2010年1月2日。好在Wordpress提供了很多时间参数，用户可以输出自定义的日期，这一点和PHP里面的date函数有点类似。</p>
<p>下面是一些常用的参数：</p>
<p>* a代表小写的英语的上下午，如am、pm<br />
* A代表大写的英语的上下午，如AM、PM<br />
* d代表英语的日期（小于10仍为两位数写法），如05、12<br />
* D代表中文的星期，如五、七<br />
* F代表中文的月份（包括“月”这个字），如五月、十二月<br />
* g代表英语的小时（小于10为一位数写法），如5、12<br />
* G代表英语的小时（小于10仍为两位数写法），如05、12<br />
* h代表英语的分钟（小于10为一位数写法），如5、12<br />
* H代表英语的分钟（小于10仍为两位数写法），如05、12<br />
* j代表英语的日期（小于10为一位数写法），如08-02-09<br />
* l代表中文的星期（包括“星期”这两个字），如星期五、星期七<br />
* m代表英语的月份（小于10仍为两位数写法），如05、12<br />
* M代表英语的月份（以单词的形式显示），如Jun<br />
* n代表英语的月份（小于10为一位数写法），如5、12<br />
* O代表英语的时区，如+0800<br />
* r代表完整的日期时间，如Tue, 06 Jun 2006 18:37:11 +0800<br />
* S代表日期的序数后缀，如st、th<br />
* T代表英语的时区（以单词的形式显示），如CST<br />
* w代表英语的星期，如5、7<br />
* W代表周数，如23<br />
* y代表两位数年份，如07、08<br />
* Y代表四位数年份，如2007、2008<br />
* z代表天数，如156</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yinzhili.com/2010/01/wordpress-time-parameters.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Techified主题的footer文件解密版</title>
		<link>http://www.yinzhili.com/2009/08/wordpress-techified-theme-footer.html</link>
		<comments>http://www.yinzhili.com/2009/08/wordpress-techified-theme-footer.html#comments</comments>
		<pubDate>Wed, 19 Aug 2009 07:45:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[techified]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.yinzhili.com/?p=43</guid>
		<description><![CDATA[众所周知Wordpress是一个开放的平台，各种免费和收费的主题层出不穷。其中有一款名叫&#8221;Techified&#8221;的主题我非常喜欢，现在我用的就是它。然而这款主题的作者为了保留版权信息，居然将footer部分加密，我无法猜测他用的是什么算法(因为我用Base64解密程序是无法将它[......]<p class='read-more'><a href='http://www.yinzhili.com/2009/08/wordpress-techified-theme-footer.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>众所周知Wordpress是一个开放的平台，各种免费和收费的主题层出不穷。其中有一款名叫&#8221;Techified&#8221;的主题我非常喜欢，现在我用的就是它。然而这款主题的作者为了保留版权信息，居然将footer部分加密，我无法猜测他用的是什么算法(因为我用Base64解密程序是无法将它解密的)，总之直接解密可能会很麻烦，但是就像很多站长那样，我们都希望在footer部分加入一些信息，比如备案信息或者统计代码之类。幸好在一个论坛上(抱歉，我都忘了是哪个论坛了)发现一位高手写了一份解密版的代码，我试着用在了现在的主题上，确实可用，因此在这里共享一下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&nbsp;
&lt;div id=&quot;footer_area&quot;&gt;&lt;div id=&quot;footer_area_content&quot;&gt;
                        &lt; ?php include (TEMPLATEPATH . '/footer_content.php'); ?&gt; 
                &lt;/div&gt;
        &lt;/div&gt;
        &lt;div id=&quot;footer_bottom&quot;&gt;
                &lt;div id=&quot;footer_bottom_content&quot;&gt; Copyright &amp;copy; &lt; ?php echo gmdate(__('Y')); ?&gt; &lt;a href=&quot;&lt;?php echo get_settings('home'); ?&gt;&quot;&gt;&lt; ?php bloginfo('name'); ?&gt;&lt;/a&gt;. &lt;a href=&quot;http://www.technologytricks.com/techified-just-another-premium-wordpress-themes/&quot;&gt;Techified&lt;/a&gt; theme by &lt;a href=&quot;http://www.ifreecellphones.com/&quot;&gt;Cell Phones&lt;/a&gt;. Supported by &lt;a href=&quot;http://www.ifreecellphones.com/cheap-verizon-wireless-phones.asp&quot;&gt;Verizon Wireless&lt;/a&gt;, &lt;a href=&quot;http://www.ifreecellphones.com/cheap-t-mobile-phones.asp&quot;&gt;T-Mobile&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://www.ifreecellphones.com/cheap-sprint-pcs-phones.asp&quot;&gt;Sprint&lt;/a&gt;
&lt;/div&gt;
        &lt;/div&gt;</pre></td></tr></table></div>

<p>说明：请尊重设计者的劳动成果，在这一文件的基础上添加自己的信息就可以了，不要修改或删除作者原有的链接。</p>
<p>补充说明：网友 <strong>最后块烧饼</strong> 提醒说，上面这段代码可能会引发错位问题，虽然我测试时没有遇到，但还是感谢他/她给予的指正。你可以在 <a href="http://www.onlysb.com/design/180.html">这里</a> 看到他/她制作的完美版。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yinzhili.com/2009/08/wordpress-techified-theme-footer.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
