補足 この記事は旧徳丸浩の日記からの転載です。元URL、アーカイブ、はてなブックマーク1、はてなブックマーク2。 備忘のため転載いたしますが、この記事は2007年11月26日に公開されたもので、当時の徳丸の考えを示すものを、基本的に内容を変更せずにそのまま転載するものです。 補足終わり 本稿ではSQLインジェクション対策として、SQLのエスケープ処理の方法について検討する。 最近SQLインジェクション攻撃が猛威を振るっていることもあり、SQLインジェクションに対する解説記事が増えてきたようだが、対策方法については十分に書かれていないように感じる。非常に稀なケースの対応が不十分だと言っているのではない。ごく基本的なことが十分書かれていないと思うのだ。 SQLインジェクション対策には二通りある。バインド機構を使うものと、SQLのエスケープによるものだ。このうち、SQLのエスケープについて、十分
「データベースはブラックボックス。どんなSQL文を投げたらどんな結果が返ってくるかさえ知っていればよい」---そう思っている人も多いかもしれません。 しかし,本物のソフトウエア・エンジニアを目指すのであれば,データベースが動く仕組みを学ぶことは避けて通れません。パフォーマンスなどに問題が生じたときどこから手を付けていいのか皆目見当がつかない,といった事態に陥りかねません。 市販のRDBMSの内部はかなり複雑ですが,基本的な部分を理解するのはそれほど難しくありません。この特集でデータベースの動く仕組みを理解してください。 イントロ ●ブラックボックスのままでいいの? 基礎から理解するデータベースのしくみ(1) Part1 ●SQL文はどのように実行されるのか 基礎から理解するデータベースのしくみ(2) 基礎から理解するデータベースのしくみ(3) 基礎から理解するデータベースのしくみ(4) 基
Instant SQL Formatter SQLを色んな形式で整形できる「Instant SQL Formatter」。 入力したSQLをHTMLで分かりやすくカラーリング&整形したり、C#やDelphi、PHPなどの言語で使えるように変換することが可能です。 次のように、長ーーいSQL文があったとしても整形して見やすくすることが出来ます。 select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.t ype#,i.flags,i.property,i.pctfree$,i.initrans,i.ma xtrans,i.blevel,i.leafcnt,i.distkey,i.lblkkey,i.db lkkey,i.clufac,i.cols,i.analyzetime,i.samplesize,i .dataobj#,nvl(i.degree,
GT Nitro: Car Game Drag Raceは、典型的なカーゲームではありません。これはスピード、パワー、スキル全開のカーレースゲームです。ブレーキは忘れて、これはドラッグレース、ベイビー!古典的なクラシックから未来的なビーストまで、最もクールで速い車とカーレースできます。スティックシフトをマスターし、ニトロを賢く使って競争を打ち破る必要があります。このカーレースゲームはそのリアルな物理学と素晴らしいグラフィックスであなたの心を爆発させます。これまでプレイしたことのないようなものです。 GT Nitroは、リフレックスとタイミングを試すカーレースゲームです。正しい瞬間にギアをシフトし、ガスを思い切り踏む必要があります。また、大物たちと競いつつ、車のチューニングとアップグレードも行わなければなりません。世界中で最高のドライバーと車とカーレースに挑むことになり、ドラッグレースの王冠
http://www.mysql-ucj2007.jp/details/j25.html 木下 靖文 氏 NTTコムウェア株式会社 プロジェクト管理統括部技術SE部門 DB技術グループ (「InnoDB」は「いんのでーびー」と言うらしい...今まで「いのでーびー」と言ってました) InnoDBをなぜ使うか トランザクション コミット、ロールバック、セーブポイント 外部キー 行レベルロック オンラインバックアップ クラッシュリカバリ クラッシュリカバリ MyISAMはデータ量の増大とともに時間がかかる InnoDBはデータ量の増大との相関がない InnoDBチューニングの王道的アプローチ クエリを改善して全体的に処理効率を上げる データサイズをできるだけ小さく メモリをできるだけ多く積む コミット性能(同期書き込み) innodb_flush_log_at_trx_commit=1,0,2
はじめに SQLが集合論に立脚する言語であるということは、この連載で一貫して強調してきたテーマの一つです。その特性のゆえに、SQLは「集合指向言語」と呼ばれていますし、実際、集合的な観点から見たときに初めて、その強力さが理解できると私は考えています。しかし現実には、SQLのこの側面は長らく無視されてきました。 その背景には、SQLにも責任の一端があります。というのも、SQLはちょっと前まで、高校で習う程度の基本的な集合演算子すら持っていなかったからです。和(UNION)こそSQL-86からの古参ですが、交差(INTERSECT)と差(EXCEPT)が標準に入ったのはSQL-92ですし、除算(DIVIDE BY)が未だに標準化されていないことは、前にも述べました。だから、SQLが言語として不完全だという批判は、理由のないものではなかったのです。 しかし、現在では標準SQLに基本的な集合演算子
長~いSQL文を見ているとどこがどういう構造になっているのかがわからなくなってきますよね。 そうしたときに使えそうなのが「SQL in Form」です。 一般向けのサービスではないですが、関係ある方には便利なのでは。 以下に簡単にご紹介。 ↑ たとえばこのようなSQL文。コメント分やインデントがわかりにくくなっています。 ↑ SQL in Formを通せばこの通り。構造がすっきりして見やすいですね。 変換する際には改行やインデント、空白の扱いなどの設定をすることもできます。またデスクトップ用のアプリもあるみたいですね。 ご利用は以下からどうぞ。無料で使えます。 » SQL Formatter / SQLFormatter formats SQL Statements
【関連記事】 本内容についてのアップデート記事を公開しています。あわせてご確認ください(編集部) Security&Trustウォッチ(60) 今夜こそわかる安全なSQLの呼び出し方 ~ 高木浩光氏に聞いてみた http://www.atmarkit.co.jp/fsecurity/column/ueno/60.html Webアプリケーションに対する攻撃手法の1つであるSQLインジェクションの存在は、かなり広く知られるようになった。しかし、その対策はまだ本当に理解されていないように思える。フォームから渡された値の特殊文字をエスケープしたり、PHPのmagic_quotes_gpcといった自動エスケープ機能をオンにするだけで対策したつもりになっていないだろうか。 基本はもちろん、セカンドオーダーSQLインジェクションやマルチバイト文字を利用したSQLインジェクションの攻撃パターンや、その対
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く