<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>DB2</title>
<link>http://www.aiview.com/</link>
<description>Alex&apos;s Public Information Portal.</description>
<copyright>Copyright 2008</copyright>
<lastBuildDate>Tue, 26 Feb 2008 12:02:28 +0700</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.34</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 

<item>
<title>Dreamhost 系统漏洞可导致帐户被完全控制</title>
<description><![CDATA[<p>
安全漏洞：已知任一Dreamhost注册用户的主email地址，即可获得对该帐户的完全访问权限。&nbsp;
</p>
<p>
适用范围：<a href="http://www.dreamhost.com">Dreamhost</a> <a href="https://panel.dreamhost.com/">WebPanel</a>
</p>
<p>
发现日期：2007-3-10
</p>
<h4>漏洞描述</h4>
<p>
在Dreamhost 注册的用户（包括免费帐户），均可通过修改自己的主email地址（primary e-mail contact address）为与系统中其他用户已设置的主email地址相同的方式，来获得对修改后的email地址原所属帐户的完全控制，被入侵用户正常的Dreamhost 服务不受影响，也不会受到任何警告和通知。
</p>
<h4>背景介绍</h4>
<p>
<a href="http://www.dreamhost.com">Dreamhost</a> 的注册用户可以使用<a href="http://wiki.dreamhost.com/DreamHost_Web_ID">WebID</a>  或者主email地址登录<a href="https://panel.dreamhost.com/">WebPanel</a> ，管理帐户，WebID 由系统根据用户姓名自动生成，主email地址由用户在注册时提供，系统对两者都会进行唯一性检查，不允许重复。主email地址作为用户的联系方式，可以在profile 中随时进行更改，WebID 则不允许更改。
</p>
<blockquote>
	<p>
	<strong>* NOTE-2:</strong> Each new Web ID <strong>MUST</strong> have a unique <em>primary e-mail contact address!</em>
	This is because you can log into the control panel either using your
	Web ID or your primary e-mail contact address. Also, the primary
	contact address is also the <strong>ONLY</strong> address that can be used for <strong>referrals!</strong>
	Additional address can also be added if you like, these can be
	duplicated across other Web IDs, but the primary contact address must
	be unique. 
	</p>
</blockquote>
<h4>漏洞测试步骤&nbsp;</h4>
<ol>
	<li>模拟用户A：在系统中注册免费帐户test1作为被入侵测试帐户，WebID为test1，主email 为test1@domain.com，密码：&ldquo;111111&rdquo;</li>
	<li>模拟用户B：在系统中注册免费帐户test2作为入侵测试帐户，WebID为test2，主email 为test2@domain.com，密码：&ldquo;222222&rdquo;</li>
	<li>用户B：登录test2帐户，编辑profile，将主email 地址修由test2@domain.com改为test1@domain.com，保存成功，退出登录</li>
	<li>用户B：检查test2@domain.com 收件箱，收到一封email地址变更通知</li>
	<li>用户A：检查test1@domain.com 收件箱，未收到任何来自Dreamhost的通知</li>
	<li>用户B：使用test1@domain.com 和密码&ldquo;222222&rdquo; 登录，登录成功，并且获得了与用户A 相同的访问控制</li>
	<li>用户B：使用WebID test1 和密码&ldquo;222222&rdquo; 登录，登录成功，获得对原有用户B 的资源访问。</li>
	<li>用户A：使用test1@domain.com 和密码&ldquo;111111&rdquo; 登录，一切正常</li>
</ol>
<h4>原因</h4>
<p>
在进行主email 变更时，系统未进行与注册步骤相同的email唯一性检查，致使作为用户唯一标识之一的主email 可能发生重复。Dreamhost 将会混淆两个原本完全不相关的帐户。结果是，用户A使用更改后的用户B的email 以及自己原有密码可以登录成功，并获得了用户B帐户的完全控制权，而那个不幸的用户B没有得到任何警告，他仍然可以使用自己的email 和密码正常登录自己的管理界面。
</p>
<p>
此时，Dreamhost WebID 并没有被搞混，用户A可以使用WebID 替代email，保持对自己原有帐户的访问。不过，很多用户大概不会留意WebID ， 有两个地方可以查知自己的WebID：
</p>
<ol>
	<li>Dreamhost 发送的邮件主题，例如： [<span class="hilite">xxxxx</span> 8729481] DreamHost Payment Receipt，xxxxx 就是WebID</li>
	<li>登录WebPanel，进入Edit Profile，界面显示：&quot;Welcome, <span class="hilite">xxxxx</span>. Logout&quot;，这里也能找到WebID</li>
</ol>
<p>
已将此问题反映给了Dreamhost 的<a href="https://panel.dreamhost.com/index.cgi?tree=support.msg">Support Team</a>，在问题得到修复之前，此篇日志不会被发布。
</p>
<p>
我会保持关注。
</p>
<h4>更新&nbsp;2008-02-26</h4>
<p>
Dreamhost 已经修复此漏洞，下面是在profile 中修改主email的错误提示。
</p>
<blockquote>
	<p>
	<font color="red">You cannot make <strong>sample@domain.com</strong> your primary address because another account already has it as its primary address!</font> 
	</p>
</blockquote>
]]></description>
<link>http://www.aiview.com/2008/02/critical_secure_issue_on_dreamhost.html</link>
<guid>http://www.aiview.com/2008/02/critical_secure_issue_on_dreamhost.html</guid>
<category>Web</category>
<pubDate>Tue, 26 Feb 2008 12:02:28 +0700</pubDate>
</item>
<item>
<title>Firefox Extension 思维导图</title>
<description><![CDATA[<p>
因为图片太宽，要完整显示，请点击<a href="#" onclick="document.getElementsByTagName('link')[1].disabled=true;return false">这里暂时禁止样式单</a>。
</p>
<p>
恢复样式单，请点击<a href="#" onclick="document.getElementsByTagName('link')[1].disabled=false;return false">这里</a>，或者<a href="#" onclick="window.location.reload()">刷新</a>本页。
</p>
<!--START CLICKABLE IMAGEMAP-->
<div style="text-align : center;">
<img src="http://farm1.static.flickr.com/230/474730547_6aa30c9598_o.jpg" width="1170" height="775" usemap="#4bxoUVoO0iZklcGSs8OQ" alt="Firefox Extension" border ="0">
<map name="4bxoUVoO0iZklcGSs8OQ">
<area shape="rect" coords="765, 574, 785, 595" href="http://xulplanet.com/tutorials/whyxul.html" alt="Why use XUL?">
<area shape="rect" coords="715, 569, 800, 597" href="http://xulplanet.com/tutorials/whyxul.html" alt="Why use XUL?">
<area shape="rect" coords="406, 478, 427, 498" href="http://www.mozilla.org/js/spidermonkey/" alt="http://www.mozilla.org/js/spidermonkey/">
<area shape="rect" coords="289, 475, 429, 500" href="http://www.mozilla.org/js/spidermonkey/" alt="http://www.mozilla.org/js/spidermonkey/">
<area shape="rect" coords="361, 300, 382, 321" href="http://kb.mozillazine.org/Setting_up_extension_development_environment" alt="http://kb.mozillazine.org/Setting_up_extension_development_environment">
<area shape="rect" coords="174, 259, 384, 322" href="http://kb.mozillazine.org/Setting_up_extension_development_environment" alt="http://kb.mozillazine.org/Setting_up_extension_development_environment">
<area shape="rect" coords="968, 503, 988, 524" href="http://xulplanet.com/tutorials/xultu/" alt="http://xulplanet.com/tutorials/xultu/">
<area shape="rect" coords="836, 500, 991, 526" href="http://xulplanet.com/tutorials/xultu/" alt="http://xulplanet.com/tutorials/xultu/">
<area shape="rect" coords="573, 486, 594, 507" href="http://developer.mozilla.org/en/docs/About_JavaScript" alt="http://developer.mozilla.org/en/docs/About_JavaScript">
<area shape="rect" coords="466, 481, 598, 509" href="http://developer.mozilla.org/en/docs/About_JavaScript" alt="http://developer.mozilla.org/en/docs/About_JavaScript">
<area shape="rect" coords="406, 525, 427, 546" href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide" alt="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide">
<area shape="rect" coords="234, 503, 429, 547" href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide" alt="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide">
<area shape="rect" coords="1138, 644, 1158, 664" href="http://www.cat-snow.com/post/146.html" alt="http://www.cat-snow.com/post/146.html">
<area shape="rect" coords="1000, 641, 1161, 666" href="http://www.cat-snow.com/post/146.html" alt="http://www.cat-snow.com/post/146.html">
<area shape="rect" coords="1138, 559, 1158, 580" href="http://www.cat-snow.com/post/137.html" alt="http://www.cat-snow.com/post/137.html">
<area shape="rect" coords="1000, 557, 1161, 582" href="http://www.cat-snow.com/post/137.html" alt="http://www.cat-snow.com/post/137.html">
<area shape="rect" coords="1026, 531, 1047, 552" href="http://www.xulplanet.com/references/elemref/" alt="http://www.xulplanet.com/references/elemref/">
<area shape="rect" coords="836, 529, 1049, 554" href="http://www.xulplanet.com/references/elemref/" alt="http://www.xulplanet.com/references/elemref/">
<area shape="rect" coords="1138, 587, 1158, 608" href="http://www.cat-snow.com/post/140.html" alt="http://www.cat-snow.com/post/140.html">
<area shape="rect" coords="1000, 585, 1161, 610" href="http://www.cat-snow.com/post/140.html" alt="http://www.cat-snow.com/post/140.html">
<area shape="rect" coords="1138, 616, 1158, 636" href="http://www.cat-snow.com/post/145.html" alt="http://www.cat-snow.com/post/145.html">
<area shape="rect" coords="1000, 613, 1161, 638" href="http://www.cat-snow.com/post/145.html" alt="http://www.cat-snow.com/post/145.html">
<area shape="rect" coords="406, 619, 427, 640" href="http://www.mozilla.org/js/scripting/" alt="http://www.mozilla.org/js/scripting/">
<area shape="rect" coords="232, 597, 429, 642" href="http://www.mozilla.org/js/scripting/" alt="http://www.mozilla.org/js/scripting/">
<area shape="rect" coords="602, 295, 623, 316" href="http://kb.mozillazine.org/Extension_development" alt="http://kb.mozillazine.org/Extension_development">
<area shape="rect" coords="421, 271, 627, 318" href="http://kb.mozillazine.org/Extension_development" alt="http://kb.mozillazine.org/Extension_development">
<area shape="rect" coords="406, 572, 427, 593" href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference" alt="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference">
<area shape="rect" coords="234, 550, 429, 594" href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference" alt="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference">
<area shape="rect" coords="328, 148, 349, 168" href="http://developer.mozilla.org/en/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System" alt="http://developer.mozilla.org/en/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System">
<area shape="rect" coords="87, 107, 351, 170" href="http://developer.mozilla.org/en/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System" alt="http://developer.mozilla.org/en/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System">
<area shape="rect" coords="637, 704, 658, 725" href="http://developer.mozilla.org/en/docs/Extensions" alt="http://developer.mozilla.org/en/docs/Extensions">
<area shape="rect" coords="408, 680, 663, 727" href="http://developer.mozilla.org/en/docs/Extensions" alt="http://developer.mozilla.org/en/docs/Extensions">
<area shape="rect" coords="146, 704, 166, 725" href="http://developer.mozilla.org/en/docs/XMLHttpRequest" alt="http://developer.mozilla.org/en/docs/XMLHttpRequest">
<area shape="rect" coords="9, 702, 168, 727" href="http://developer.mozilla.org/en/docs/XMLHttpRequest" alt="http://developer.mozilla.org/en/docs/XMLHttpRequest">
<area shape="rect" coords="348, 670, 369, 691" href="http://developer.mozilla.org/en/docs/Building_an_Extension" alt="http://developer.mozilla.org/en/docs/Building_an_Extension">
<area shape="rect" coords="150, 667, 371, 693" href="http://developer.mozilla.org/en/docs/Building_an_Extension" alt="http://developer.mozilla.org/en/docs/Building_an_Extension">
<area shape="rect" coords="348, 717, 369, 738" href="http://developer.mozilla.org/en/docs/Code_snippets" alt="http://developer.mozilla.org/en/docs/Code_snippets">
<area shape="rect" coords="205, 696, 371, 740" href="http://developer.mozilla.org/en/docs/Code_snippets" alt="http://developer.mozilla.org/en/docs/Code_snippets">
</map>
</div>
<!--END CLICKABLE IMAGEMAP-->
<p>最近几天看有关Firefox Extension 的开发，有很多知识链接，使用MindManager 做了这个思维导图，链接可以点击。 </p>
<p>更新了链接，增加了浏览指引小图标 </p>]]></description>
<link>http://www.aiview.com/2007/04/firefox_extension.html</link>
<guid>http://www.aiview.com/2007/04/firefox_extension.html</guid>
<category>Software Technical</category>
<pubDate>Fri, 27 Apr 2007 02:43:27 +0700</pubDate>
</item>
<item>
<title>ASCII Art Pictures</title>
<description><![CDATA[<p style="font-family: monospace; font-size: 8pt; line-height: 110%">
888888888888888DDDDDDD8DNNNNNNNNNNNNDNN8DNNNDNDDNNNNNNNN8888888D8DDDD8DDDDDDDDD8<br />
88888888888DDDDDDDDDDDDDNNNNNNNNNNNNNNNNDDDO8NNNNNNNNNNND8D8DDD8D8DDDDDDDDDDDDD8<br />
88888888888DDDDDDDDDDDDNNMNNMNNNNMNNNNNNNDDDD8NNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDD<br />
88888888DDDDDDDDDDDDDDDNNNNNNNNNNNNNNNNNNNNDND8DNDNNNNNNNDDDDDDDDDDDDDDDDDDDDDDD<br />
88888D8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........<br />
NNMMNNNNMMMMMMMMNMMNMMNNMMMMMMMNNNDDZ:,,:~::,,,.,.,~::N8~MMNMMMNNN8..$7.....=:..<br />
MNMNNNMMNMMMMMMMMMMMMMNMMMMMMNNNNND7:,::~+=?~:,,,.,.INNMMMMMMMMN=...Z.$..,~...,M<br />
NMNNNNMMMMMMMMMMMMMMMMMMMMMMMNNNNNNI:,..8OOOO??::,,.+NMMMMMMNZ..8.D..,,:~,..DMNM<br />
NNMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNN$~~,,,,,.:Z8$I~:.MNNMMMM~.+$7,=..:+,..:NNNNMM<br />
NNNNMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNN$~~~::~,,,,..O,MNNNNI..?.:7:...=...DDNNNNNNM<br />
NNNNMMMMMMMMMMMMMMMMMMMMMNNNNNNMMMMMMN$??=~:~:,,.INNNM..::~.:...?..,:NNNNNNNNNNN<br />
NNNNNNMNMMMMMMMMMMMMMMMNNNNNNMMMMMMNNNMMMNNDZ?~,.NM=..ZI~I,..=~...NNNNNNNNNNNNNN<br />
NNNNNMMMMMMMMMMMMMMMMNMNNNMNNMMMMMMMNMMMMMMMNM8DM.....N+.,,....:MMMMNNNNNNNNNNNN<br />
MMMMNMMMMMMMMMMMMMMNNNMNNMMMMMMMMMMMMMMMMMMMMM:........~.:...MMMMMMMMNNNNNNNNNNN<br />
MMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMMMNMMMMD.........,:...~MMMMMMMMMMNNNNNNNNNNM<br />
MMMMMMMMMMMMMMMMMNNMMMMNMMMMMMMMMMMMMMMMM.........:+,...MMMMMMMMMMMMMMNNNNNNNNMM<br />
MMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMM8..............~MMMMMMMMMMMMMMMMNNNNNNNMMM<br />
</p>
<p>
这样的图案很酷吗？<a href="http://www.glassgiant.com/ascii/" target="_blank" title="More: http://www.glassgiant.com/ascii/">glassgiant.com</a> 提供免费的在线服务，让我们把任何图片转换成ASCII 形式的图案。在选择图片时要小心哦，太大的图片会花费很长时间进行生成的，一个2M的照片似乎花费了几分钟，几十k 的图片则很迅速。
</p>
<p>
Firefox 1.5 无法正常访问这个服务，还好，新装了<a href="http://ietab.mozdev.org/">IE Tab</a>  插件，一键在Firefox 与IE 之间切换很方便。
</p>
<p>
这里还有一些现成的ASCII&nbsp; <a href="http://www.doghause.com/ascii.asp">图案</a> ，给手懒的人看。 
</p>
]]></description>
<link>http://www.aiview.com/2007/04/ascii_art_pictures.html</link>
<guid>http://www.aiview.com/2007/04/ascii_art_pictures.html</guid>
<category>Web</category>
<pubDate>Wed, 18 Apr 2007 21:23:19 +0700</pubDate>
</item>
<item>
<title>每天丢掉一点统计数据</title>
<description><![CDATA[<p>
不恰当的日志统计设置，可能会导致每天丢掉一部分日志统计数据，请看我犯过的错误。&nbsp;
</p>
<p>
我使用<a href="http://awstats.sourceforge.net/">awstats</a>  统计日志数据，在config 文件中，我设定如下参数：
</p>
<pre class="code">
LogFile=&quot;/home/username/logs/aiview.com/http/access.log&quot;
</pre>
<p>
我在crontab 中设定每天在整点每间隔4个小时运行一次统计更新。
</p>
<pre class="code">
00 0-23/4 * * * ~/jobs/updawt.sh  
</pre>
<p>
我的空间在<a href="http://www.dreamhost.com">Dreamhost</a> ，日志生成情况如下，包含当天，一共有最近6天的日志文件，当天的命名为 access.log，前五天加日期后缀，最早的4天压缩存储，第五天不压缩。同时为第五天的日志建立了一个名为access.log.0 的符号连接。 
</p>
<pre class="output">
-rw-r--r--  1 root       root      1830112 Apr 16 22:03 access.log
lrwxrwxrwx  1 root       root           21 Apr 16 01:03 access.log.0 -&gt; access.log.2007-04-15
-rw-r--r--  1 xxx        xxx       255078 Apr 11 00:50 access.log.2007-04-10.gz
-rw-r--r--  1 xxx        xxx       222179 Apr 12 00:58 access.log.2007-04-11.gz
-rw-r--r--  1 xxx        xxx       214981 Apr 13 00:07 access.log.2007-04-12.gz
-rw-r--r--  1 xxx        xxx       150369 Apr 14 00:13 access.log.2007-04-13.gz
-rw-r--r--  1 root       root      1096740 Apr 16 01:03 access.log.2007-04-15&nbsp;
</pre>
<p>
我在配置文件中指定的文件名是access.log ，从前，我一直以为awstats 会自动合并access.log.[0-9]，也包括这里的access.log.0 ，但刚刚发现，awstats 并不做这件事情，除非详细指定。
</p>
<p>
结果就是，我会丢失从日志文件发生轮换那一刻起，至最后一次统计更新之间的那部分日志的统计数据，因为它们没有获得被统计的机会，就被重命名为access.log.0 。而依据我的设置，access.log.0 并不在统计范围。
</p>
<p>
这里还有一些细节，统计数据是否会丢，以及会丢掉多少，还取决于日志轮换的具体时间（并不总是发生在零点），以及我的job 执行间隔与执行时间。无论如何，更改配置文件，使其不依赖于这些不确定因素是好的方法。 
</p>
<p>
我修改了我的统计配置文件如下：
</p>
<pre class="code">
#LogFile=&quot;/home/username/logs/aiview.com/http/access.log&quot;
<span class="emphasis">LogFile=&quot;./tools/logresolvemerge.pl /home/username/logs/aiview.com/http/access.log /home/username/logs/aiview.com/http/access.log.0 |&quot;&nbsp;</span>
</pre>
<p>
<a href="http://awstats.sourceforge.net/docs/awstats_tools.html">logresolvemerge.pl</a>  随awstats 程序包提供，你需要指定适用你的正确路径。&nbsp;
</p>
<p>
&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/04/each_day_i_miss_a_peice_of_statistics_of_http_log.html</link>
<guid>http://www.aiview.com/2007/04/each_day_i_miss_a_peice_of_statistics_of_http_log.html</guid>
<category>Web</category>
<pubDate>Tue, 17 Apr 2007 12:11:17 +0700</pubDate>
</item>
<item>
<title>awstats 如何统计旧日志</title>
<description><![CDATA[<p>
<a href="http://www.flickr.com/photo_zoom.gne?id=461587816&amp;size=o"><img src="http://farm1.static.flickr.com/186/461587816_52ecd5ad1f.jpg?v=0" alt="awstats page" width="500" height="226" /></a>  
</p>
<p>
awstats 文档中提供了<a href="http://www.aiview.com/cgi-bin/awstats/docs/awstats_faq.html#OLDLOG">一个方法</a> ，需要清空过去所有的统计数据，并依次重新更新所有的历史日志；另外还包含了一个tips，不必清空所有过去的统计数据，就可以把过去遗漏的某天数据加入统计，但依然要求清空一整个月的统计数据。
</p>
<p>
这些历史统计数据保存在config 文件中DirData 参数所定义的目录中，并且是按月保存的。
</p>
<p>
awstats.aiview.com.conf ：
</p>
<pre class="code">
DirData=&quot;./xyz&quot;
</pre>
<p>
目录包含文件：&nbsp;
</p>
<pre class="output">
awstats012007.aiview.com.txt
awstats022007.aiview.com.txt
awstats032007.aiview.com.txt
awstats042007.aiview.com.txt
</pre>
<p>
前几日，Dreamhost 报告文件服务器发生了一些故障，之后就发现我的http 日志停止了更新，在其恢复服务后，12、13日的日志被重新刷新，但14日全天以及15日部分日志丢失。
</p>
<p>
今天是16日，在日志丢失期间，已经通过crontab 自动更新过多次统计数据，只是这几天统计数据都为零。要想补上12、13、15日的统计数据，只有清除4月份的统计数据文件：awstats042007.aiview.com.txt 文件，并从4月1日开始依次更新所有统计数据。但Dreamhost 只保存最近6天的http 日志，这个办法行不通。
</p>
<p>
经查看awstats&nbsp; 历史统计数据文件，找到解决方法，算是另外一个tips 。
</p>
<p>
以下代码片段来自4月份统计数据文件：awstats042007.aiview.com.txt 。LastTime 参数保存了统计的http 日志条目最晚的时间（区别于运行update 的时间），我们可以通过把其他几个时间参数修改为此时间，并且重置一些条目参数来达到目的。 
</p>
<pre class="code">
LastLine 20070416000000 4386 898321 47205111575
FirstTime 20070401002121
<span class="emphasis">LastTime</span> 20070412035620
LastUpdate 20070416000004 2542 0 0 0 2542
</pre>
<p>
&nbsp;下面是修改后的条目：（<span class="emphasis">修改前请先备份旧文件！</span>）
</p>
<pre class="code">
LastLine <span class="hilite">20070412035620 0 0 0</span>
FirstTime 20070401002121
LastTime 20070412035620
LastUpdate <span class="hilite">20070412035620 0 0 0 0 0</span>
</pre>
<p>
接着修改config 文件，注释掉原来的日志路径，指向到旧的日志压缩文件。
</p>
<pre class="code">
#LogFile=&quot;/home/username/logs/aiview.com/http/access.log&quot;
LogFile=&quot;gzip -d &lt;/home/username/logs/aiview.com/http/access.log.2007-04-12.gz |&quot;&nbsp;
</pre>
<p>
然后运行命令更新统计数据。（注意：如果设置有crontab，操作前最好先disable 任务，免得引起不期望的结果）
</p>
<pre class="cmd">
$ cd ~/aiview.com/cgi-bin/awstats/
$ ./awstats.pl -config=aiview.com -update 
</pre>
<p>
这时刷新统计页面，已经可以看到13日的统计数据，依次在config 文件中把日志更换为13、15日的文件，并逐次运行更新，即可把所缺日志依次补回。
</p>
<p>
这种方法虽然不要求具有当天至月初的所有访问日志文件，但要求具有所补日期至当天或者至当月末的所有日志文件。&nbsp;
</p>
<p>
看来，写个job 定期备份日志还是有必要的。&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/04/tips_for_processing_an_old_log_file_in_awstats.html</link>
<guid>http://www.aiview.com/2007/04/tips_for_processing_an_old_log_file_in_awstats.html</guid>
<category>Web</category>
<pubDate>Mon, 16 Apr 2007 22:00:18 +0700</pubDate>
</item>
<item>
<title>Javascript 的噩梦可以结束了</title>
<description><![CDATA[<p>
<a href="http://www.getfirebug.com/">Firebug</a>  是针对Firefox 的一个插件，它与Firefox 很好的集成到了一起，帮助你分析与网页在客户端的一切行为，当然，获益最大的大概就是Javascript 的调试了。
</p>
<p>
下面是一个例子，红色部分代表遇到了一个脚本错误。 
</p>
<p>
<img src="http://farm1.static.flickr.com/253/456703301_7cc9344357.jpg?v=0" alt="firebug status" width="500" height="18" /> 
</p>
<p>
点开后，Firebug 指示出了错误文件与相关代码行。
</p>
<p>
<a href="http://www.flickr.com/photo_zoom.gne?id=456688100&amp;size=o"><img src="http://farm1.static.flickr.com/175/456688100_20586efe44.jpg?v=0" alt="firebug interface" width="500" height="135" /></a>
</p>
<p>
&nbsp;再继续查看，就直接定位到了相关上下文，这里我们可以看到，是在line 22 多了一个额外的注释标记 &quot;*/&quot;，导致此错误。
</p>
<p>
<a href="http://www.flickr.com/photo_zoom.gne?id=456688166&amp;size=o"><img src="http://farm1.static.flickr.com/216/456688166_226af6474e.jpg?v=0" alt="firebug interface" width="500" height="254" /></a>  
</p>
<p>
修复后，显示正常状态。
</p>
<p>
<img src="http://farm1.static.flickr.com/181/456703431_c2ec74de24.jpg?v=0" alt="firebug status" width="256" height="59" />
</p>
<p>
如果错误不太容易找到，还可以设置断点进行调试，直接在行号部分点击即可设置断点，然后刷新一次网页重新执行脚本，执行到断点处会自动停下，可以像通常调试工具一样选择执行进度，观察并设置变量。
</p>
<p>
Firebug 是完全免费的，要了解更多的功能，请参考考<a href="http://www.getfirebug.com/">官方网站</a> 。&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/04/firebug.html</link>
<guid>http://www.aiview.com/2007/04/firebug.html</guid>
<category>Web</category>
<pubDate>Sun, 15 Apr 2007 01:00:44 +0700</pubDate>
</item>
<item>
<title>CSS 被不期望的下载了多次</title>
<description><![CDATA[<p>
前日看网站日志，发现IE 与Firefox 在对待外联CSS 上的一些细微差别。
</p>
<pre class="code">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen.css&quot; media=&quot;screen&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen.css&quot; media=&quot;projection&quot; /&gt;
</pre>
<p>
对待这样的CSS定义，Firefox 会把screen.css 完整下载两次，而IE 仅仅会有一次访问。
</p>
<pre class="output">
123.112.2.228 - - [12/Apr/2007:09:34:10 -0700] &quot;GET /css/screen.css HTTP/1.1&quot; 200 5327 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:39:11 -0700] &quot;GET /css/screen.css HTTP/1.1&quot; 200 5327 &quot;http://www.aiview.com/&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11&quot;
123.112.2.228 - - [12/Apr/2007:09:39:12 -0700] &quot;GET /css/screen.css HTTP/1.1&quot; 200 5327 &quot;http://www.aiview.com/&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11&quot;
</pre>
<p>
但是对于另外一项，它们却有不同的表现。
</p>
<pre class="code">
&lt;link rel=&quot;<span class="attribute-value">alternate </span>stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/print.css&quot; media=&quot;screen&quot; title=&quot;PrintPreview&quot;/&gt;
&lt;link rel=&quot;<span class="attribute-value"></span>stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/print.css&quot; media=&quot;print&quot; /&gt;
</pre>
<p>
Firefox 针对print.css 访问了一次，而IE 则有两次，第二次是<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">http 304</a> ，也属于正常。
</p>
<pre class="output">
123.112.2.228 - - [12/Apr/2007:09:34:10 -0700] &quot;GET /css/print.css HTTP/1.1&quot; 200 1486 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:34:11 -0700] &quot;GET /css/print.css HTTP/1.1&quot; 304 256 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:39:12 -0700] &quot;GET /css/print.css HTTP/1.1&quot; 200 1486 &quot;http://www.aiview.com/&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11&quot;&nbsp;
</pre>
<p>
再来看另外一个例子，screen.css 与screen-clearstyle.css 均引用了base.css 和extend.css 。
</p>
<pre class="code">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen.css&quot; media=&quot;screen&quot; title=&quot;GetStyleBack&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen-clearstyle.css&quot; media=&quot;screen&quot; title=&quot;ClearStyle&quot; /&gt;
</pre>
<pre class="code">
@import &quot;base.css&quot;;
@import &quot;extend.css&quot;;
</pre>
<p>
对于多个CSS 文件引用的同一个CSS，Firefox 不会再去检查文件修改日期，而IE 照例进行了多次访问，虽然后续仅访问了header，如果引用比较复杂的话，还是有一些可观流量的。
</p>
<pre class="output">
123.112.2.228 - - [12/Apr/2007:09:34:10 -0700] &quot;GET /css/screen.css HTTP/1.1&quot; 200 5327 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:34:10 -0700] &quot;GET /css/base.css HTTP/1.1&quot; 200 1484 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:34:11 -0700] &quot;GET /css/base.css HTTP/1.1&quot; 304 256 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:34:11 -0700] &quot;GET /css/extend.css HTTP/1.1&quot; 200 1964 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:34:11 -0700] &quot;GET /css/extend.css HTTP/1.1&quot; 304 256 &quot;http://www.aiview.com/&quot; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)&quot;
123.112.2.228 - - [12/Apr/2007:09:39:11 -0700] &quot;GET /css/screen.css HTTP/1.1&quot; 200 5327 &quot;http://www.aiview.com/&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11&quot;
123.112.2.228 - - [12/Apr/2007:09:39:11 -0700] &quot;GET /css/base.css HTTP/1.1&quot; 200 1484 &quot;http://www.aiview.com/css/screen.css&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11&quot;
123.112.2.228 - - [12/Apr/2007:09:39:11 -0700] &quot;GET /css/extend.css HTTP/1.1&quot; 200 1964 &quot;http://www.aiview.com/css/screen.css&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11&quot;
</pre>
<p>
通过这次测试，还学习了一点额外的东西，对于浏览器来说，F5 与CTRL+F5 有一些区别，虽然都是刷新，但F5 仅仅会重新获取相比cache 有所更新的文件，CTRL+F5 则强制性重新获取所有文件。另外提一点，在Firefox 中，F5 与工具栏中的刷新按钮，或者是菜单中的刷新项(CTRL+R)，效果都一样，IE 也是如此。
</p>
<p>
&nbsp;
</p>
<p>
顺便把<a href="http://www.aiview.com/2006/12/refine_and_add_new_features_to_my_web_site.html#16">CSS 切换功能</a> 给取消了，还是保持简单点好。因此上面的部分代码，在页面源文件中已经找不到了，下面是个完整的参考：
</p>
<pre class="code">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/common.css&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen.css&quot; media=&quot;screen&quot; title=&quot;GetStyleBack&quot; /&gt;
&lt;link rel=&quot;alternate stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen-linestyle.css&quot; media=&quot;screen&quot; title=&quot;LineStyle&quot; /&gt;
&lt;link rel=&quot;alternate stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen-clearstyle.css&quot; media=&quot;screen&quot; title=&quot;ClearStyle&quot; /&gt;
&lt;link rel=&quot;alternate stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/print.css&quot; media=&quot;screen&quot; title=&quot;PrintPreview&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/screen.css&quot; media=&quot;projection&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/print.css&quot; media=&quot;print&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.aiview.com/css/aural.css&quot; media=&quot;aural&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot; src=&quot;http://www.aiview.com/switch-css.js&quot;&gt;&lt;/script&gt;
</pre>
<p>
&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/04/f5_and_ctrlf5.html</link>
<guid>http://www.aiview.com/2007/04/f5_and_ctrlf5.html</guid>
<category>Web</category>
<pubDate>Sat, 14 Apr 2007 23:55:32 +0700</pubDate>
</item>
<item>
<title>唠叨下微软的Live.com</title>
<description><![CDATA[<p>
微软对自己之前的<a href="http://www.msn.com">IM</a> 、<a href="http://hotmail.msn.com">Email</a> 、<a href="http://spaces.msn.com/">Spaces</a>  等服务进行了整合，称为<a href="http://www.live.com">Live </a> 战略升级，这本无可厚非，不过因我未及时响应其升级行动，把我长时间未登录的hotmail 邮箱中的几百封邮件全部清空，我可就要发发牢骚了。
</p>
<p>
放弃<a href="http://hotmail.msn.com">hotmail</a> ，是因为有了<a href="https://gmail.com">gmail</a> ，好处就不在这讨论了，但<a href="http://im.live.com">msn messenger</a> 还在继续使用，大部分联系人还在这上面，只不过登录的邮件不是hotmail 罢了，而是gmail 的。在hotmail 中没有找到自动邮件回复功能，也没有找到自动邮件转发功能，今天登录进去，告诉我可以免费升级到功能更强大的live 邮箱，满怀希望的开始尝试，以上功能依然没有。
</p>
<p>
我这一抱怨就收不住了，又想起前段时间帮朋友迁移blog，从msn spaces 到<a href="http://www.sixapart.com/movabletype/">mt</a> ，但是发现无法将space 的所有日志导出，rss只包含了最近20条。&nbsp;
</p>
<p>
微软的live 战略升级，从某种程度来说是一种受迫性竞争的结果，观察其调整的过程以及域名的混乱，就能看出其进程的痛苦，并且还将延续下去。&nbsp;
</p>
<p>
说了这么多微软的坏话，说点好听的吧。新版msn spaces 提供的rss 订阅模块不错，虽然未能与本地发布的日志整合到一起进行显示（同时，你的联系人也无法通过messenger获得你的space 更新通知），但也多了一种额外的选择。我不在msn spaces 写日志，但可以配置一个到aiview.com 的rss 订阅，这样就可以在<a href="http://aiviewrss.spaces.live.com">我的spaces</a> 上显示aiview.com 的文章列表。
</p>
<p>
<img src="http://www.aiview.com/ref/2007/04/msn_spaces.jpg" alt="msn_spaces.jpg" width="501" height="462" />
</p>
]]></description>
<link>http://www.aiview.com/2007/04/babble_about_ms_live_dot_com.html</link>
<guid>http://www.aiview.com/2007/04/babble_about_ms_live_dot_com.html</guid>
<category>Web</category>
<pubDate>Thu, 12 Apr 2007 13:07:05 +0700</pubDate>
</item>
<item>
<title>我是这样使用flickr 的</title>
<description><![CDATA[<p>
下面是flickr 的基本介绍，如果你已经在使用，可以直接<a href="#my_way_to_flickr">跳到这里</a>  阅读。
</p>
<p>
<a href="http://www.flickr.com">Flickr</a>  是非常优秀的在线图片管理工具，提供免费的服务，主要优点：
</p>
<ul>
	<li>批量剪裁压缩、上传，一步完成，传输速度快</li>
	<li>图片保存精度较高</li>
	<li>响应快速的管理界面（Ajax）</li>
	<li>标签、日期方式索引</li>
</ul>
<p>
免费服务主要的限制：
</p>
<ul>
	<li>每个月限100M上传流量 <br />
	</li>
	<li>最多管理200张图片，超出可以继续上传，旧的不会被删除，但会被隐藏起来，无法任何方式可以浏览（Flickr Blog除外）。</li>
	<li>最多只允许建立3个Sets</li>
</ul>
<p>
如果照片不会超过200张，Flickr 是一个非常好的选择；如果会达到数百张，如果选择了Flickr，那么升级到Flickr Pro （$24/Year）几乎是没有选择的，否则转换成本比较高。
</p>
<p>
<a name="my_way_to_flickr" title="my_way_to_flickr"></a>
我是这样使用Flickr的：
</p>
<h4>上传图片</h4>
<p>
除了网页上传，效率更高的方式是下载Flickr <a href="http://www.flickr.com/tools/">Upload 工具</a> ，集成到鼠标右键菜单，拖放操作，支持批量，十分方便。
</p>
<h4>浏览图片&nbsp;</h4>
<p>
我通常通过Tags 和日期（Archive）来浏览图片，日期分为上传日期（Posted）和拍摄日期（Taken），基本上可以满足需求。
</p>
<h4>管理图片</h4>
<p>
管理图片需要先进入Organize，然后通过下面的过滤器筛选出图片列表，拖入当前区域，然后所有的编辑功能都可以通过上面的菜单选择，比如修改标签、权限、日期等等。
</p>
<h4>权限管理</h4>
<p>
上传的图片可以指定5 种权限级别：
</p>
<ol>
	<li>Public - 任何人都可以看</li>
	<li>Private - 只有自己一个人能看</li>
	<li>Family - 加入到Family 组的人可以看</li>
	<li>Friends - 加入到Friends 组的人可以看</li>
	<li>Friends &amp;Family - Family 或者Friends 组的人都可以看</li>
</ol>
<p>
除了私有（private）与家庭（family），只有单一的Friends 组可以用来作为访问控制，对于多个朋友圈，很明显，不够用。
</p>
<p>
对此，Flickr 提供了Groups。上传时，无法指定Groups，对于希望受限访问的图片，可以全部选择Private，上传后，针对不同的朋友圈，可以建立相应的Private Groups，然后把相应的图片放入这个Group。然后邀请朋友Join 到不同的Groups，这样就实现了额外层次的访问授权。 
</p>
<p>
上述描述起来有些复杂，不过实际操作非常简单顺手。
</p>
<h4>2007-04-22&nbsp; 更新</h4>
<p>
付费Pro 版已经没有了最多3 个Sets 的限制，于是为所有图片以Event 为单位建立了Sets， 对于天数较多的活动可以按地点分为多个Sets，然后建立Collection 包含这几个Sets。&nbsp;
</p>
<p>
Sets 默认使用创建顺序显示，可以在Organization Sets 编辑区中利用拖拽调整顺序。
</p>
<p>
对于所有照片的主题进行归纳（实际是针对Sets），然后建立相应的<a href="http://www.flickr.com/photos/alexzhangs/collections/">主题Collections</a> ，把已有的<a href="http://www.flickr.com/photos/alexzhangs/sets/">Sets</a>  或者Collection 加入这些主题Collections，注意，Collection 不可以即包含Sets，又包含Collection，只能<a href="http://www.flickr.com/help/forum/36025/?search=collection">同时包含一种</a> 。
</p>
<p>
另外一个小tips，或许是我从前太土了，在Organization 页面的编辑区中，无论是图片，还是Sets，单击均不会有任何操作，双击则可以打开。&nbsp;
</p>
<h4>2007-04-23&nbsp; 更新</h4>
<h5>Blog this&nbsp;</h5>
<p>
在<a href="http://flickr.com/account/?tab=extend">Extending Flickr</a>  设置了关联Blog，支持很多种Blog 程序，也包括我使用的MT，仅仅需要指定MT 的远程访问API 接口脚本(http://www.aiview.com/cgi-bin/mt/mt-xmlrpc.cgi)，用户名和密码即可，这个密码不是登录MT 控制台的密码，是API 调用的密码，在MT用户属性页下方设置。
</p>
<p>
设置完成，既可以点击图片上方的&quot;Blog this&quot; ，输入Title 和Description，直接发布到Blog。有一点遗憾，就是无法指定Entry 的Category 、Tags 以及Basename。
</p>
<h5>Upload by email&nbsp;</h5>
<p>
Flickr 还支持<a href="http://www.flickr.com/account/uploadbyemail/">Email 上传图片</a> ，它会为每一个用户生成一个唯一并且私有的Email 地址（例如：lto30doing@photos.flickr.com），任何知道这个邮件地址的人都可以发布图片到相关联的Flickr，因此对其要保持私密。 
</p>
<p>
Email 的Subject 与Body 会分别作为图片的Title 与Description。 可以在Subject 或者Body 中使用以下的<a href="http://www.flickr.com/help/photos/#140">格式</a> 来添加Tags：
</p>
<p>
tags: flowers &quot;my garden&quot;
</p>
<p>
但无法指定Sets、Groups 等。 
</p>
<p>
默认的，通过email 发送的图片都是public 的，如果希望<a href="http://www.flickr.com/help/photos/#141">使用其他权限</a> ，可以加后缀到email 地址。比如：
</p>
<p>
lto30doing+private@photos.flickr.com<br />
lto30doing+friends@photos.flickr.com<br />
lto30doing+family@photos.flickr.com <br />
lto30doing+ff@photos.flickr.com
</p>
<h5>Blog this by email<br />
</h5>
<p>
额外的，如果希望email 上传的图片都自动发布到已经设置好的Blog，可以在<a href="http://www.flickr.com/account/uploadbyemail/blog/">这里设置</a> ，会得到另外一个email 地址，譬如： 
</p>
<p>
lto30doing2blog@photos.flickr.com
</p>
<p>
只有Public 的图片才会被自动发布到Blog，其余的就只存放在Flickr。也可以在一封信中包含多个附件，但每一张图片都会生成单独的entry，并share&nbsp; 相同的Title 与Description，所以并不实用。
</p>
<p>
同样，无法指定Entry 的Category 、Tags 以及Basename。
</p>
<p>
&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/04/how_i_play_with_flickr.html</link>
<guid>http://www.aiview.com/2007/04/how_i_play_with_flickr.html</guid>
<category>Web</category>
<pubDate>Wed, 11 Apr 2007 01:18:40 +0700</pubDate>
</item>
<item>
<title>使用Firxfox 1.5 访问Gmail 时指定https://</title>
<description><![CDATA[<p>
<img src="http://farm1.static.flickr.com/180/453735051_2047c2f3e6.jpg?v=0" alt="Firefox window" width="500" height="269" /> 
</p>
<h4>
故障现象
</h4>
<p>
输入域名 mail.google.com 或者 gmail.com 访问Gmail，Firefox 显示空白页，无任何提示，同一时间使用IE 却可以正常访问。
</p>
<h4>
解决方法</h4>
<p>
造成大多数人无法访问的根源在于下面的第一条，如果无法解决再尝试后面2条。
</p>
<ol>
	<li class="emphasis">在域名之前加上 https://，指定 http:// 或者仅输入域名均无法访问</li>
	<li>确认Firefox 选项设置中允许SSL连接</li>
	<li>如果安装有防火墙，检查设置</li>
</ol>
<p>
在IE 中无需特别指定https，以任意方式输入，均会跳入正常页面。
</p>
<h4>放弃2.0 &nbsp;</h4>
<p>
从前使用1.5 遇到过这个问题，升级到2.0 后问题自然消失，也就没有深究。最近发现2.0 响应速度很慢，经常把CPU 用到100％，切换一个Tab 要花费几秒钟，开始以为是Flash 插件惹的祸，安装了Flashblock 禁用Flash 之后，问题依旧，也排除了页面script、打开页面太多等问题。今天装回到1.5 版本，响应慢的问题也随之解决。不过gmail 的问题又回来了，google 了一下，发现<a href="http://www.google.cn/search?complete=1&amp;hl=zh-CN&amp;newwindow=1&amp;q=firefox%E6%97%A0%E6%B3%95%E8%AE%BF%E9%97%AEgmail&amp;meta=">问题很普遍</a> ，答案也多种多样，比如：域名解析、SSL、TLS、防火墙、代理设置、Pop Block，证书等等。但我经过测试，<span class="emphasis">其实真正的原因只有一个，就是大家输入域名的习惯问题，省略了&quot;https://&quot; 或者其中的 &quot;s&quot;</span>。把<a href="https://gmail.com">https://gmail.com</a>  或者 <a href="https://mail.google.com">https://mail.google.com</a>  加入收藏夹即可。
</p>
<p>
对于大多数默认安装的Firefox 1.5 来说，上述其它方面导致问题的概率比较低。
</p>
<p>
google.com 域名一直存在大陆访问不稳定的问题，mail.google.com 也曾经受累一段时间，不过现在，mail.google.com 已经比较稳定了。在你发现IE 可以访问gmail，但Firefox 无法访问时，十有八九本文可以帮到你。
</p>
<p>
欢迎大家反馈。&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/04/firxfox_15_cant_access_to_gmail.html</link>
<guid>http://www.aiview.com/2007/04/firxfox_15_cant_access_to_gmail.html</guid>
<category>Web</category>
<pubDate>Tue, 10 Apr 2007 12:09:58 +0700</pubDate>
</item>
<item>
<title>i&apos;m Initiative 活动现在只限美国地区参与</title>
<description><![CDATA[<p>
阿森发送给我关于<a href="http://www.xcar.com.cn/bbs/viewthread.php?tid=4970726&amp;extra=page%3D1">&ldquo;i&#39;m&rdquo;的消息</a>，这看起来是个<a href="http://im.live.com/Messenger/IM/About/">十分有趣的主意</a> ，<a href="http://im.live.com/Messenger/IM/Causes/">9个</a> 国际慈善组织会通过此活动得到资金，有爱心的人越多，资金的数目就越大，而微软则扩大了msn Messenger的有效用户群，并促使老的用户升级到新版本。
</p>
<p>
回头看了看朋友的列表，已经有很多人的名字中都多了这个&ldquo;i&#39;m&rdquo;，我一直没在意，因为我还在用7.5的版本。但我发现，美国以外地区的messenger注册用户是不包含在这个活动范围内的，请参考活动<a href="http://im.live.com/Messenger/IM/Home/">官方网页</a>的<a href="http://im.live.com/Messenger/IM/About/Press/PDFs/imFAQ.pdf">FAQ</a> 中最后一个Q/A。
</p>
<blockquote>
	<p>
	Q: Can everyone participate in this initiative?<br />
	A: The i&rsquo;m Initiative is available to everyone in the 50 United States and the District of<br />
	Columbia. 
	</p>
</blockquote>
<p>
不过，官方成员在自己的Blog发布了一篇文章，<a href="http://messengersays.spaces.live.com/blog/cns!5B410F7FD930829E!25315.entry">The i&#39;m Initiative and new secret emoticon</a> ，文章中说明参与&ldquo;i&#39;m&rdquo;的美国地区用户与其他国家地区的用户之间的对话（Conversation），对捐献活动是有效的。这篇文章也是一篇不错的&ldquo;i&#39;m&rdquo;参与指南。
</p>
<p>
我在<a href="http://zyndjjxbll.1314bloger.com/archives/688580/">这里</a> 看到的新增慈善组织也未在官方网页中声明，值得商榷。&nbsp;
</p>
<blockquote>
	<p>
	新增加的组织：<br />
	*wwf World Wildlife Fund for Nature 世界自然基金會<br />
	*oxfam The Oxford Committee for Famine Relief 樂施會(協助解決當時世界各地饑荒及貧窮問題)<br />
	*care 國際關懷協會<br />
	*hsus The Humane Society of the United States 美國人道協會<br />
	*acs American Cancer Society 美國癌症協會<br />
	*one ONE Campaign-全球消除貧困與對抗愛滋的組織(GCAP) 
	</p>
</blockquote>
<p>
无论如何， 这个活动看起来还在发展之中，微软还没有设定中止日期的计划，所以今后会有多少个组织参与，并且是否会扩展到美国以外地区也未可知。不过，看着朋友列表上不断多出的&ldquo;i&#39;m&rdquo;，还是很开心。
</p>
]]></description>
<link>http://www.aiview.com/2007/03/im_initiative.html</link>
<guid>http://www.aiview.com/2007/03/im_initiative.html</guid>
<category>Web</category>
<pubDate>Mon, 12 Mar 2007 18:43:10 +0700</pubDate>
</item>
<item>
<title>再谈国内如何访问维基百科(Wikipedia)</title>
<description><![CDATA[<p>
维基百科 (www.wikipedia.com)自2005年10月在国内就无法访问， 但<a href="http://www.aiview.com/2005/09/wikipedia.html">维基百科</a>依然是查找资料最好的选择之一。过去，我一直透过<a href="http://www.answers.com/">Answer.com</a>  进行访问，我在这里<a href="http://www.aiview.com/2006/03/a_new_way_to_access_wikipedia_in_china.html">介绍过方法</a>，但近日发现，通过Answers.com 存取的维基百科页面与最新的内容有一定时滞。下面是维基百科一个页面的编辑<a href="http://www.un-block.net/index.php?__script_get_form=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvdy9pbmRleC5waHA%252FdGl0bGU9TmF0aW9uYWxfSW5kdXN0cmlhbF9TZWN1cml0eV9Qcm9ncmFtJmFtcDs%253D&amp;title=National_Industrial_Security_Program&amp;diff=107525668&amp;oldid=99313417">历史比较</a> ，左侧的版本是Answers.com 中<a href="http://www.answers.com/main/ntquery?s=dod+5220.22-m&amp;gwp=13">所显示的</a> ，右侧是当前维基百科<a href="http://www.un-block.net/index.php?__script_get_form=aHR0cDovL3d3dy53aWtpcGVkaWEub3JnL3NlYXJjaC1yZWRpcmVjdC5waHA%253D&amp;search=dod+5220.22-m&amp;language=en&amp;go=++%3E++&amp;go=Go">最新的版本</a> ，以今天的日期来算，Answers.com 对这个页面的cache更新周期至少大于1个月。
</p>
<p>
<a href="http://www.aiview.com/ref/2007/03/wiki_history.gif"><img src="http://www.aiview.com/ref/2007/03/wiki_history-thumb.gif" alt="wiki_history.gif" width="400" height="212" /></a>
</p>
<p>
Xiongxiong 告诉我另一种访问维基百科的方法&mdash;&mdash;使用网站代理。打开<a href="http://blog.manboo.info/260.htm">这个网页</a>，选择任一网站代理，进入后输入维基百科的网址，就可以访问了。上例中使用的是 <a href="http://www.un-block.net/">http://www.un-block.net/</a>
</p>
<p>
当然，网站代理的作用不仅仅用于访问维基百科，其它受限网站也可以尝试。
</p>
]]></description>
<link>http://www.aiview.com/2007/03/another_way_to_access_wikipedia.html</link>
<guid>http://www.aiview.com/2007/03/another_way_to_access_wikipedia.html</guid>
<category>Web</category>
<pubDate>Fri, 09 Mar 2007 18:10:59 +0700</pubDate>
</item>
<item>
<title>Google 之三人成虎</title>
<description><![CDATA[<p>
这两天查找有关彻底清除硬盘数据的信息，Google帮了不少忙，很多资料都引用了美国国防部的DoD 5220.22-M 标准，类似以下的文字在中文互联网上<a href="http://www.google.cn/search?q=dod+5220.22-m+%E8%A6%86%E5%86%99&amp;btnG=%E6%90%9C%E7%B4%A2&amp;complete=1&amp;hl=zh-CN&amp;newwindow=1">广泛流传</a> 。
</p>
<blockquote>
	<p>
	美国国防部在《国家工业安全程序操作手册》中对硬盘数据清除作了专门的描述，这个安全标准被称为DOD 5220.22-M（<a href="http://www.dss.mil/isec/nispom_0195.htm" target="_blank">www.dss.mil/isec/nispom_0195.htm</a>）。该手册建议对所要清除的数据区进行三次覆盖，第一次使用一个8位的字符，第二次使用该字符的互补字符（即将二进制位的0、1互换），最后再使用随机字符进行覆盖。 
	</p>
</blockquote>
<p>
注：NISPOM 是国家工业安全程序（NATIONAL INDUSTRIAL SECURITY PROGRAM）的缩写。 
</p>
<p>
国内外的各种数据清除工具，也有很多按上述类似说法引用了此标准，比如有名的开源软件<a href="http://sourceforge.net/project/screenshots.php?group_id=61951&amp;ssid=39777">Darik&#39;s Boot and Nuke</a>。出于兴趣，我找到了这个 <a href="http://www.fas.org/sgp/library/nispom.htm">DoD 5220.22-M</a> 文档（前文的链接无法访问），但无论如何有没有找到被大量资料所提及的数据清除方法。我开始怀疑这个引用的权威性，最后，在<a href="http://www.wikipedia.com/">wikipedia</a>  找到的<a href="http://www.rofflecakes.org/index.php?__script_get_form=aHR0cDovL3d3dy53aWtpcGVkaWEub3JnL3NlYXJjaC1yZWRpcmVjdC5waHA%253D&amp;search=dod+5220.22-m&amp;language=en&amp;go=Go">文字证实</a>了我的猜测。<a href="http://www.aiview.com/2006/03/a_new_way_to_access_wikipedia_in_china.html">国内一直无法访问wikipedia</a> ，下面的链接使用了网站<a href="http://www.rofflecakes.org/">代理</a> 。
</p>
<blockquote>
	<p>
	<span class="mw-headline">Misunderstanding as a data sanitization standard</span><br />
	<br />
	DoD 5220.22-M is sometimes cited as a standard for <a href="http://www.rofflecakes.org/index.php?q=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TYW5pdGl6YXRpb25fJTI4Y2xhc3NpZmllZF9pbmZvcm1hdGlvbiUyOQ%3D%3D" title="Sanitization (classified information)">sanitization</a> 
	to counter <a href="http://www.rofflecakes.org/index.php?q=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9EYXRhX3JlbWFuZW5jZQ%3D%3D" title="Data remanence">data 
	remanence</a>. This is incorrect. The NISPOM covers the entire field of 
	government-industrial security, of which <a href="http://www.rofflecakes.org/index.php?q=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TYW5pdGl6YXRpb25fJTI4Y2xhc3NpZmllZF9pbmZvcm1hdGlvbiUyOQ%3D%3D" title="Sanitization (classified information)">data 
	sanitization</a> is a very small part (about two paragraphs in a 100 page 
	document)<sup class="reference"><a href="#_note-3">[4]</a></sup>. Furthermore, the NISPOM does not actually specify 
	any particular method. Standards for sanitization are left up to the Cognizant 
	Security Authority. The <a href="http://www.rofflecakes.org/index.php?q=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9EZWZlbnNlX1NlY3VyaXR5X1NlcnZpY2U%3D" title="Defense Security Service">Defense 
	Security Service</a> provides a <em>Clearing and Sanitization Matrix</em><sup class="reference"><a href="#_note-4">[5]</a></sup> which does 
	specify methods; access to the current C&amp;SM is restricted <a rel="nofollow" href="http://www.rofflecakes.org/index.php?q=aHR0cDovL3d3dy5kc3MubWlsL2ZpbGVzL3BkZi9jbGVhcmluZ19hbmRfc2FuaXRpemF0aW9uX21hdHJpeC5wZGY%3D" title="http://www.dss.mil/files/pdf/clearing_and_sanitization_matrix.pdf" class="external text">here</a>. 
	</p>
</blockquote>
<p>
<a href="http://www.fas.org/sgp/library/nispom.htm">DoD 5220.22-M</a> 一度被作为数据清除的标准进行引用，这是错误的。这个文档覆盖了全部的政府与工业的安全领域，描述数据清除的内容仅占很小的一部分（100页文档中仅有2段文字）。此外，文档中并没有定义任何具体的数据清除方法。数据清除的标准是由Cognizant 
Security Authority（不知如何翻译）来决定的，可以在国防安全服务（<a href="http://www.rofflecakes.org/index.php?q=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9EZWZlbnNlX1NlY3VyaXR5X1NlcnZpY2U%3D" title="Defense Security Service">Defense 
Security Service</a>）提供的一个名为&ldquo;<em><a href="http://www.rofflecakes.org/index.php?q=aHR0cDovL3d3dy5kc3MubWlsL2ZpbGVzL3BkZi9jbGVhcmluZ19hbmRfc2FuaXRpemF0aW9uX21hdHJpeC5wZGY%3D">Clearing and Sanitization Matrix</a> &rdquo;</em>的文档中找到。
</p>
<p>
以下是有关硬盘数据的那部分内容，与前述相符，但不同的是，这不属于<a href="http://www.fas.org/sgp/library/nispom.htm">DoD 5220.22-M</a> 标准。
</p>
<blockquote>
	<p>
	d. THIS METHOD NOT APPROVED FOR SANITIZING MEDIA THAT CONTAINS TOP SECRET INFORMATION.<br />
	<br />
	1. Before any sanitization product is acquired, careful analysis to the overall costs associated with overwrite/sanitization should be made. Depending on the contractor&rsquo;s environment, the size of the drive and the differences in the individual products time to perform the sanitization, destruction of the media might be the preferred (i.e., economical) sanitization method.<br />
	<br />
	2. Overwrite all addressable locations with a character, then its complement. Verify &ldquo;complement&rdquo; character was written successfully to all addressable locations, then overwrite all addressable locations with random characters; or verify third overwrite of random characters. Overwrite utility must write/read to &ldquo;growth&rdquo; defect list/sectors or disk must be mapped before initial classified use and remapped before sanitization. Difference in the comparison lists must be discussed with the DSS Industrial Security Representative (IS Rep) and/or Information System Security Professional (ISSP) before declassification. Note: Overwrite utilities must be authorized by DSS before use. 
	</p>
</blockquote>
<p>
值得注意的是，文档中注明：这种数据清除方法并不适用于绝密信息。可见对于美国以外，甚至其它非政府控制机构，其安全性仍然有限。
</p>
<p>
Google就像快餐，速食并且方便，但食得不干净却容易拉肚，很多人不再关心信息的来源，瞧！Google到这么多相同的搜索结果，就是它了！正所谓三人成虎。
</p>
]]></description>
<link>http://www.aiview.com/2007/03/three_talks_make_a_tiger_on_google.html</link>
<guid>http://www.aiview.com/2007/03/three_talks_make_a_tiger_on_google.html</guid>
<category>Software Technical</category>
<pubDate>Wed, 07 Mar 2007 23:17:40 +0700</pubDate>
</item>
<item>
<title>Secure communication on both direction by HTTPS</title>
<description><![CDATA[<h4>HTTPS Overview&nbsp;</h4>
<p>
Let&#39;s have an overview on HTTPS.
</p>
<pre>
|        HTTPS
|        /  \ 
|    HTTP    SSL    SET
|              \   /
|               PKI
</pre>
<p>
HTTPS is based on HTTP protocal and SSL protocal.
</p>
<p>
SSL protocal is an implement of PKI standard.
</p>
<h4>What is PKI? </h4>
<p>
To discuss HTTTS, we are better to know what PKI is first. It&#39;s very important! Here&#39;s an article <a href="http://fanqiang.chinaunix.net/a5/b5/20010608/190000448.html">talking about PKI</a>  in detail. 
</p>
<p>
PKI, Public Key Infrastructure, is attend to insure the data security transfered over Internet and identify the authentic user.
</p>
<p>
The public key for ones could be obtained by everyone on Internet, the private key is only kept by the owner. Signing with the public key will insure the data security. Signing with the private key will insure the undeniable.
</p>
<p>
So it requires both side have theire own keys for insuring secure communication on both direction. However in some situation, it&#39;s not easy to get keys on both side, such as B2C, you can&#39;t require each visiter getting their keys for using your website.
</p>
<h4>How does SSL work?</h4>
<p>
Is there a way to have secure communication  both direction without requiring keys on the browser side? The answer is yes, there&#39;s SSL. Below&#39;s a section from the article <a href="http://docs.sun.com/source/816-6156-10/contents.htm">Introduction to SSL</a> that describes how SSL works very clearly.<br />
</p>
<blockquote>
	<p>
	The SSL protocol uses a combination of public-key and symmetric 
	key encryption. Symmetric key encryption is much faster than public-key 
	encryption, but public-key encryption provides better authentication 
	techniques. An SSL session always begins with an exchange of messages 
	called the <em>SSL handshake</em>. The handshake allows the server 
	to authenticate itself to the client using public-key techniques, 
	then allows the client and the server to cooperate in the creation 
	of symmetric keys used for rapid encryption, decryption, and tamper 
	detection during the session that follows. Optionally, the handshake 
	also allows the client to authenticate itself to the server. 
	</p>
</blockquote>
<p>
Below is brief steps for SSL Handshake(assume it&#39;s between Internet Browser and web server.)
</p>
<pre>
Browser side (no keys)          &lt;-----&gt;         Server with SSL (keys based on PKI)
--
B   -&gt;  hello, wanna a secure connection                    -&gt;  S
B   -&gt;  my ssl version                                      -&gt;  S
B   -&gt;  my encrypt type                                     -&gt;  S
B   -&gt;  some random data                                    -&gt;  S
B   -&gt;  hello done                                          -&gt;  S
--
B   &lt;-  hello, yeah, i accept                               &lt;-  S
B   &lt;-  some random data                                    &lt;-  S
B   &lt;-	my certificate including my pub-key                 &lt;-  S
B   &lt;-  hello done                                          &lt;-  S
--
B   verify the certificate                                      S
B   generate &quot;premaster secret&quot;                                 S
B   -&gt;  &quot;premaster secret&quot; encrypted with server&#39;s pub-key  -&gt;  S
B   generate &quot;master secret&quot; by &quot;premaster secret&quot;              S
B   generate &quot;session keys&quot; by &quot;master secret&quot;                  S
B   -&gt;  I&#39;ll send data encrypted by &quot;session keys&quot; at next  -&gt;  S
B   -&gt;  encrypted &quot;I&#39;m ready&quot;                               -&gt;  S
--
B   decrypt &quot;premaster secret&quot; with server&#39;s priv-key           S
B   generate &quot;master secret&quot; by &quot;premaster secret&quot;              S
B   generate &quot;session keys&quot; by &quot;master secret&quot;                  S
B   &lt;-  I&#39;ll send data encrypted by &quot;session keys&quot; at next  &lt;-  S
B   &lt;-  encrypted &quot;I&#39;m ready&quot;                               &lt;-  S
--
Handshake is finished.
</pre>
<p>
For the steps above, it&#39;s not for the case of server reqests the
client authenication. Here only discuss the case of none-keys on client
side. 
</p>
<p>
We know the keys on server side is only used for exchanging the session key. The session key is the symmetric key that is acctrually used to encrypt/decrypt data between client and server. 
</p>
<p>
I&#39;m not sure how related between the browser and server&#39;s random data at their first hello step. At browser generates &quot;premaster secret&quot;, it might base on the random data from server. it&#39;s my guess. Anyone could give the steps more clear?
</p>
<br />
<h4>Reference</h4>
<ul>
	<li> <a href="http://docs.sun.com/source/816-6156-10/contents.htm">Introduction to SSL</a></li>
	<li><a href="http://fanqiang.chinaunix.net/a5/b5/20010608/190000448.html">PKI 基础<br />
	</a></li>
	<li><a href="http://www.cnweblog.com/harryyang/archive/2005/06/03/12713.html">在Web中使用SSL<br />
	</a><span class="postTitle2">http://www.cnweblog.com/harryyang/archive/2005/06/03/12713.html</span><a href="http://www.cnweblog.com/harryyang/archive/2005/06/03/12713.html"><br />
	</a></li>
	<li><a href="http://www.ourshop.com/resources/ssl.html">How does ssl work?<br />
	</a>http://www.ourshop.com/resources/ssl.html<a href="http://www.ourshop.com/resources/ssl.html"><br />
	</a></li>
</ul>
<p>
&nbsp;
</p>
]]></description>
<link>http://www.aiview.com/2007/03/secure_communication_on_both_direction_by_https.html</link>
<guid>http://www.aiview.com/2007/03/secure_communication_on_both_direction_by_https.html</guid>
<category>Web</category>
<pubDate>Fri, 02 Mar 2007 18:37:18 +0700</pubDate>
</item>
<item>
<title>Tag cloud 导致页面滚动迟缓</title>
<description><![CDATA[<p>
我一直使用<a href="http://www.mozilla.com/products/firefox/central.html">Firefox</a>  浏览器，IE的收藏夹里只有淘宝、北京移动以及网银几个不支持Firefox 的links。近日突然发现自己blog在IE中长页面的滚动非常迟缓(Firefox中正常)，一跳一跳的，很不舒服，于是立刻想到了前阵子新加的功能：对于&lt;pre&gt;标签<a href="http://www.aiview.com/2007/01/ie_vertical_scrollbar_and_maxheight_problem_resolved.html">限制宽度和最大高度</a> ，为了兼容IE，在css中使用了ie hacks以及expression表达式，这可能会加重浏览器绘制工作量，从而导致页面滚动迟缓。经试验，并不是以上代码导致的，根源竟是页面底部的Tag cloud，如下图：
</p>
<p>
<img src="/ref/2007/02/tag_cloud.jpg" alt="Tag Could snapshot" width="472" height="194" /> 
</p>
<p>
模板：
</p>
<pre class="code">
  &lt;div id=&quot;tagcloud&quot;&gt;&lt;div class=&quot;inner&quot;&gt;
&lt;h3&gt;Tags&lt;/h3&gt;
&lt;MTTags&gt;
&lt;a class=&quot;h&lt;$MTTagRank$&gt;&quot; href=&quot;&lt;$MTInclude module=&quot;Tag URI&quot;$&gt;&quot; title=&quot;&lt;$MTTagCount$&gt; entries&quot;&gt;&lt;$MTTagName$&gt;&lt;/a&gt;  
&lt;/MTTags&gt;
&lt;/div&gt;&lt;/div&gt;&lt;!--tagcloud--&gt; 
</pre>
Style： <br />
<pre class="code">
#tagcloud a {
text-decoration: none;
}
#tagcloud a.h1 {
font-size: 200%;
}
#tagcloud a.h2 {
font-size: 180%;
}
#tagcloud a.h3 {
font-size: 160%;
}
#tagcloud a.h4 {
font-size: 140%;
}
#tagcloud a.h5 {
font-size: 100%;
}
#tagcloud a.h6 {
font-size: 90%;
}
</pre>
Tag 数量比较大，但对于产生此问题的原因还是不解，有人遇到吗？
]]></description>
<link>http://www.aiview.com/2007/02/tag_cloud.html</link>
<guid>http://www.aiview.com/2007/02/tag_cloud.html</guid>
<category>Web</category>
<pubDate>Wed, 07 Feb 2007 17:04:29 +0700</pubDate>
</item>


</channel>
</rss>