<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns='http://www.w3.org/2005/Atom'>

	<id>http://kaiteki-rich.com/modules/pip_cms/</id>
	<updated>2009-01-08T03:49:51+0900</updated>
	<title type='text'>副業金持ち生活 - 副業CMS最新RSS</title>
	<link rel='alternate' type='text/html' href='http://kaiteki-rich.com/'></link>
	<link rel='self' type='application/atom+xml' href='http://kaiteki-rich.com/modules/pip_cms/index.php?page=xml&amp;style=atom&amp;pipe_id='></link>
	<author><name>ネットで稼ぐサラリーマン内職</name></author>
	<generator>XOOPS - d3pipes</generator>

	
	<entry>
		<id>http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=208</id>
		<published>2009-01-07T22:46:16+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>WEBリンク集</category>
		<title type='text'>sbic-001cart</title>
		<content type='html'>sbic-001cart</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=208'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=207</id>
		<published>2009-01-07T22:44:54+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>WEBリンク集</category>
		<title type='text'>sbic-001top</title>
		<content type='html'>sbic-001top</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=207'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=206</id>
		<published>2009-01-07T22:42:37+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>WEBリンク集</category>
		<title type='text'>sbic-infoJ</title>
		<content type='html'>sbic-infoJ</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=206'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=205</id>
		<published>2009-01-07T22:39:54+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>WEBリンク集</category>
		<title type='text'>1000円shop</title>
		<content type='html'>1000円shop</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=205'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=204</id>
		<published>2009-01-07T22:38:36+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>WEBリンク集</category>
		<title type='text'>すばる</title>
		<content type='html'>すばる</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/weblinks/singlelink.php?lid=204'></link>
			</entry>
	
	<entry>
		<id>http://xoops.peak.ne.jp/md/news/index.php?page=article&amp;storyid=471</id>
		<published>2009-01-07T04:37:49+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>PHP</category>
		<title type='text'>大きな傘のSQL Injection版</title>
		<content type='html'>


XOOPSに限らず、いろいろなPHPアプリケーションで、今でもちょくちょくSQL Injection脆弱性が出てきます。それもケアレスミスです。

もちろん、ケアレスミスは人力では根絶不可能であり、SQLを文字列として生成すること自体をやめて、パラメータ方式で呼び出すべきだ、という方が本質的な議論でしょう。

ただ、オープンソースの世界では、自分の考えを他者に押しつけることはできませんし、SQL Injectionの可能性ある「誰か」の書いたコードを一切利用しない、というのも現実的ではありません。

事実として、SQL InjectionはXSSとは比べものにならないくらい恐い攻撃です。もし私がオープンソースアプリケーションで構築された特定のサイトを攻撃するとしたら、最初に狙うのはSQL Injectionでしょう。なぜならXSSやCSRF、セッション関連の攻撃と違い、即座に直接攻撃可能だからです。（さすがにコマンドインジェクションとかRFIはない、という前提で）

そういうわけで、Protectorでは、SQL Injection対策っぽいものも入っているのですが、私自身、あまり役に立っている気がしません。攻撃者がProtectorの対策コードを読めば、明らかに抜け道だらけです。（本当に役に立ったとすれば「最後にidのつくリクエスト変数名について強制的にintval()をかける」くらいでしょうが、これも副作用が大きすぎます）

強力なSQL Injection対策ができない理由は簡単で、本当に必要なリクエストと区別がつかないからです。「UNIONをUNI-ONにする」なんてのも、本当はあってはならないことです。UNIONという単語を使ったまともな投稿が勝手に書き換わってしまいます。

入口であるリクエストだけで判断している以上は、ここが限界となりますが、大きな傘anti-XSSシステムと同様、入口と出口の両方を押さえれば、かなり有力な手段となるでしょう。

anti-XSSでは、出口はobフィルターでした。XSSになる可能性があるリクエストがある時のみob_start()をかけて、出力にリクエストがそのまま含まれるようならXSSとして停止する。

これをSQL Injectionにあてはめると、出口は当然クエリ関数（メソッド）となります。SQL Injectionになる可能性があるリクエストがある時のみ、DBレイヤーを乗っ取って、クエリ本文（クオーテーション外）にリクエストが含まれるようならSQL Injectionとして停止する。

…とまあ、文章として書くのは簡単なのですが、SQL Injection用の出口処理は結構面倒です。SQLをちゃんとパースする必要がありますから。

また、この仕掛けをXOOPS用Protectorとして採用する場合、もう一つ問題があります。それは、現状のDBレイヤーは、途中で乗っ取ることが不可能、ということです。この点は、コア側に対応してもらう必要があるため、別エントリにしたいと思います。


ちなみに、今回私が考え出した（と思っていた）方法ですが、元ネタがあったのを思い出しました。
「本質的なSQL Injection対策のためにはDBレイヤーを乗っ取るしかない」
と、もう４年も前にJM2さんが指摘していました。流石としか言いようがありません :worshippy:
</content>
				<link rel='alternate' type='text/html' href='http://xoops.peak.ne.jp/md/news/index.php?page=article&amp;storyid=471'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/smartsection/item.php?itemid=426</id>
		<published>2009-01-06T10:00:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>SmartSection</category>
		<title type='text'>UNIX time と うるう秒</title>
		<content type='html'>今年(2009年) うるう秒 が挿入されたので、ちょっと調べてみた。○ 国際原子時：TAI (International Atomic Time)現在、時間は原子時計によって刻まれおり、１秒の絶対時間は不変である。○ 世界時：UT (Universal Time)私たちの日常生活は、太陽と地球の運行に関係している。自転周期を１日、公転周期を１年というが、この時間は変動する。○ 協定世界時：UTC (Coordinated Universal Time)1月1日0時という基準は UT として、１秒の刻みは TAI と同じとする時系。○ うるう秒（leap second）TAI と UTC では基準時間にズレが生じる。この ...</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/smartsection/item.php?itemid=426'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/wfdownloads/singlefile.php?lid=101</id>
		<published>2009-01-05T18:41:26+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>WFダウンロード</category>
		<title type='text'>NetCommons グーグル地図 モジュール</title>
		<content type='html'>ネットコモンズにて、グーグル地図を表示するモジュールデモはこちら■ 特徴１．１つのページに複数枚の地図が表示できます。２．吹き出しにHTMLが使用できます。見本の例：マーカーをクリックすると、「国立情報学研究所」のロゴが表示されます。ロゴをクリックすると、「国立情報学研究所」のサイトが開きます。３．場所(緯度・軽度)の設定が容易ですグーグルマップをドラック＆ズームすることで簡単に設定できます● インストールモジュール管理の「未インストールモジュール」より「インストール」を実行する。● 初期設定インストー ...</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/wfdownloads/singlefile.php?lid=101'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/newbb/viewtopic.php?forum=13&amp;topic_id=904&amp;post_id=3362#forumpost3362</id>
		<published>2009-01-05T11:21:56+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>サポート</category>
		<title type='text'>Re: 【バグ】 ヘルプが表示されません</title>
		<content type='html'>早速の対応ありがとうございます。正常に表示されるよになりました。感謝。</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/newbb/viewtopic.php?forum=13&amp;topic_id=904&amp;post_id=3362#forumpost3362'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/newbb/viewtopic.php?forum=13&amp;topic_id=905&amp;post_id=3361#forumpost3361</id>
		<published>2009-01-05T01:32:41+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>サポート</category>
		<title type='text'>Re: 【バグ】 webphotoのブロック表示不具合</title>
		<content type='html'> 早速の対応、ありがとうございました。CVSのファイルを当てたところ、正常に動作するようになりました。これからもよろしくお願いします。</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/newbb/viewtopic.php?forum=13&amp;topic_id=905&amp;post_id=3361#forumpost3361'></link>
			</entry>
	
	<entry>
		<id>http://linux.ohwada.jp/modules/newbb/viewtopic.php?forum=8&amp;topic_id=906&amp;post_id=3360#forumpost3360</id>
		<published>2009-01-05T00:06:50+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>サポート</category>
		<title type='text'>Re: RSSのタイムスタンプがずれる</title>
		<content type='html'>kenさま修正されたdate.phpに入れ替えたところ、タイムスタンプが正常になりました。ありがとうございました。</content>
				<link rel='alternate' type='text/html' href='http://linux.ohwada.jp/modules/newbb/viewtopic.php?forum=8&amp;topic_id=906&amp;post_id=3360#forumpost3360'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/news/344</id>
		<published>2009-01-03T05:52:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>お知らせ</category>
		<title type='text'>モジュール情報カテゴリ見直し</title>
		<content type='html'>当サイトのモジュール情報も登録数が300を超えカテゴリがやや窮屈になってきたので検索しやすいよう、まずはカテゴリの再設定を行います。このため、本日・明日くらいややカテゴリ設定が乱れますがご容赦ください。</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/news/344'></link>
			</entry>
	
	<entry>
		<id>http://xoops.peak.ne.jp/md/news/index.php?page=article&amp;storyid=470</id>
		<published>2008-12-28T18:02:01+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>XOOPS</category>
		<title type='text'>dirnameのcase依存性</title>
		<content type='html'>


先日、gusagiさんより、bulletinHDについてのバグレポートとして、以下のURLを転送してもらいました。
http://ryus.co.jp/modules/d3blog/details.php?bid=107
先に結論から書くと、このエントリはMySQLの基本的なcase sensitiveルールを誤解していることによる、間違ったレポートです。
Quote:
この現象は、 Windows環境で作成したDBのデータをUNIX環境に持って行った場合に限定されます。
この時点でバグでも何でもありません。まずはこっちを読んでください。
http://dev.mysql.com/doc/refman/4.1/ja/name-case-sensitivity.html
Quote:
ただ、WARPなどの環境でデータを作成してから、UNIX環境にデータを移行して運用なんてケースも考えられるので、その場合は上記パッチを適用して頂いた方が良いと思われます。
そういう「仕様外」のことをやりたければ、lower_case_table_names=1 を使うべきでしょうし、もしなんらかの理由でソースコードを改変するしかない場合でも、Database::prefix()の方にかければ一箇所で済みます。SQL生成部すべてにstrtolower()をかける、という方法はメンテナンス性という観点からも筋が悪すぎます。

# 個人的には、Case sensitiveな環境がターゲットなのに、Case insensitive環境で開発しているっていうのがあり得ない…


ただ、このレポートのおかげで私も一つ勘違いしていたことに気付きました。
それは、caseしか違わないdirnameで、２つのモジュールが同時には動かせない、ということです。

当たり前ですが、case sensivie環境で動かすのなら、XOOPSにおけるdirnameも原則的にcase sensitiveです。例えば、XUGJのQandAフォーラムは、あくまで&quot;QandA&quot;であり&quot;qanda&quot;ではありません。（中身はd3forum）

http://www.xugj.org/modules/QandA/
上のリンクは生きてますが、
http://www.xugj.org/modules/qanda/
下のリンクは死んでます。

「つまり、D3モジュールでありさえすれば、picoがインストールされている環境でも、PICOというdirnameで別のモジュールとしてインストールできるだろう」

ここに思い込みがありました。

実際にはcase sensitiveな環境でもインストールできません。
なぜならSQLとして以下のクエリで判断されるからです。
[code]
SELECT (snip) WHERE dirname=&#039;PICO&#039;
[/code]
この &#039;PICO&#039; はcase insensitiveに比較され、&#039;pico&#039;と一致します。

つまり、インストール済だよ、というメッセージで拒否されます。当たり前ですが、インストーラだけを無理矢理通過させても意味がありません。やはり同様のクエリによって、モジュールの分岐処理がなされるからです。

では、どうすれば良いのか。答えは簡単です。
[code]
ALTER TABLE (prefix)_modules MODIFY `dirname` varchar(25) binary NOT NULL default &#039;&#039;;
[/code]
としてあげれば良いのです。dirnameカラムにbinary属性を加えることによって、case sensitiveになりました。

これを実際に試してみると、picoとPICOが普通に共存できました。
まあ、そんな需要もほとんどないとは思いますが、ちょっとしたTipsくらいに覚えておくと、今後役に立つことがあるかもしれません。

なおこの場合、言語定数オーバーライド機能の一部が、picoとPICOでは独立して働きません。
それは、
[code]
$constpref = &#039;_MI_&#039; . strtoupper( $mydirname ) ;
[/code]
というコードによるものです。

考えてみたら、定数名が大文字である必然性などどこにもなく、strtoupper() を$dirnameにかけることは、バグ以外の何物でもないでしょう。

今後のD3モジュールでは、$constprefへのstrtoupper()を外していきます。（各種言語ファイルに含まれてしまっているのがかなり面倒だったりしますが…）
</content>
				<link rel='alternate' type='text/html' href='http://xoops.peak.ne.jp/md/news/index.php?page=article&amp;storyid=470'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/news/343</id>
		<published>2008-12-26T23:19:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>イベント</category>
		<title type='text'>第７回 CMS Night 1/7 のお知らせ</title>
		<content type='html'>CMS Night もおかげさまで、第7回目です。今回のレクチャーは、NetCommons のドキュメント管理モジュール WEKO MODx の新バージョン　それにXOOPS Cube は、openID 対応の予定です。前回は、レクチャーは、早めに埋まってしまったので、参加を決められた方は申し込み早めにお願いします。</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/news/343'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/news/341</id>
		<published>2008-12-26T04:26:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>お知らせ</category>
		<title type='text'>当サイトのユーザ情報周りの改良およびOpenID認証導入のお知らせ</title>
		<content type='html'>これまでXOOPS Cube日本サイトのリニューアルとして第１弾　Xigg導入第２弾　モジュール情報／パッケージ情報ページの公開を行ってきましたが、今回、サイトリニューアル第３弾としてユーザ情報周りの改良およびOpenID認証の導入を行いました。</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/news/341'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/news/327</id>
		<published>2008-12-24T19:49:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>一般</category>
		<title type='text'>XOOPS Cube 音声付きFLASH解説</title>
		<content type='html'>このたび、XOOPS Cubeの説明、操作説明を音声付きFLASHでまとめました。</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/news/327'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/modules/xigg/index.php/node/327</id>
		<published>2008-12-24T19:49:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>一般</category>
		<title type='text'>XOOPS Cube 音声付きFLASH解説</title>
		<content type='html'>このたび、XOOPS Cubeの説明、操作説明を音声付きFLASHでまとめました。</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/modules/xigg/index.php/node/327'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/news/340</id>
		<published>2008-12-24T09:18:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>テーマ／デザイン</category>
		<title type='text'>XOOPS Cube 2.2 First Experimental Site</title>
		<content type='html'>&amp;quot;One of the most difficult tasks people can perform, however much others may despise it, is the invention of good games.&amp;quot;C.G. JungSince XOOPS Cube branch 2.2 main goal is to improve User Interface, documentation and show the possibilities of Legacy. We start a designers workshop with a short explanation of Legacy features and a simple &#039;game&#039; with a combination of challenge, competition and interaction to have fun.Saying we could do almost everything, I had to create a development environment, downloading and installing a server and the last Package Legacy (SVN)  to create a Mac-like web desktop.Only open source technologies and software were allowed. The final site should run with default package only - without any extra module installed.Here is the stuff used and the final web site</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/news/340'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/modules/xigg/index.php/node/340</id>
		<published>2008-12-24T09:18:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>テーマ／デザイン</category>
		<title type='text'>XOOPS Cube 2.2 First Experimental Site</title>
		<content type='html'>&amp;quot;One of the most difficult tasks people can perform, however much others may despise it, is the invention of good games.&amp;quot;C.G. JungSince XOOPS Cube branch 2.2 main goal is to improve User Interface, documentation and show the possibilities of Legacy. We start a designers workshop with a short explanation of Legacy features and a simple &#039;game&#039; with a combination of challenge, competition and interaction to have fun.Saying we could do almost everything, I had to create a development environment, downloading and installing a server and the last Package Legacy (SVN)  to create a Mac-like web desktop.Only open source technologies and software were allowed. The final site should run with default package only - without any extra module installed.Here is the stuff used and the final web site</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/modules/xigg/index.php/node/340'></link>
			</entry>
	
	<entry>
		<id>http://xoopscube.jp/news/339</id>
		<published>2008-12-24T03:25:00+0900</published>
		<updated>2009-01-08T03:49:51+0900</updated>
		<category>お知らせ</category>
		<title type='text'>AmeventsモジュールにおけるSQLインジェクション脆弱性レポート</title>
		<content type='html'>Ameventsモジュールに、SQL Injection脆弱性が見つかったそうです。まだパッチは出ていないようです。</content>
				<link rel='alternate' type='text/html' href='http://xoopscube.jp/news/339'></link>
			</entry>
	
</feed>