<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ikepyon</author_name>
  <author_url>https://blog.hatena.ne.jp/ikepyon/</author_url>
  <blog_title>ikepyonのだめ人間日記</blog_title>
  <blog_url>https://ikepyon.hatenablog.jp/</blog_url>
  <categories>
    <anon>セキュリティ</anon>
  </categories>
  <description>バインド機能を使えば、ほぼすべてのSQLインジェクションの脆弱性を防ぐことが出来るのは良く知られていると思いたい。しかし、アプリケーションの仕様によっては、検索項目やソート順を自由に変更したい場合がある。この場合、バインド機能では残念ながら対応できない。 そこで、以下のようなSQL文を組み立てることがあるのでは無いだろうか？ sql = &quot;select * from table1 where &quot; + (入力データ1) + &quot;= ? order by &quot; + (入力データ2) + &quot;;&quot;; 「(入力データ*)」はここでブラウザから渡されたデータとする。この場合、いくらバインド機能使ってても、「(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fikepyon.hatenablog.jp%2Fentry%2F20091022%2Fp2&quot; title=&quot;動的に検索項目を指定したい場合のSQLインジェクション対策 - ikepyonのだめ人間日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-10-22 00:00:02</published>
  <title>動的に検索項目を指定したい場合のSQLインジェクション対策</title>
  <type>rich</type>
  <url>https://ikepyon.hatenablog.jp/entry/20091022/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
