<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>t_komura</author_name>
  <author_url>https://blog.hatena.ne.jp/t_komura/</author_url>
  <blog_title>t_komuraの日記</blog_title>
  <blog_url>https://t-komura.hatenadiary.org/</blog_url>
  <categories>
    <anon>PHP</anon>
    <anon>セキュリティ</anon>
  </categories>
  <description>以下のページに関連して、htmlspecialchars() を使用している場合でも XSS が可能かどうか少し調べてみました。 http://www.tokumaru.org/d/20090930.html その結果、いくつかのブラウザで文字エンコーディングに Shift_JIS を使用していた場合、XSS が可能なことを確認しました。 テストコードは以下の通りです。リンクにマウスポインタを乗せると埋め込んだ Javascript が実行されます。 &lt;?php $_GET['a1'] = &quot;\xf0&quot;; // \xf0 - \xfc で可能 $_GET['a2'] = &quot; href=dumm…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ft-komura.hatenadiary.org%2Fentry%2F20091004%2F1254665511&quot; title=&quot; Shift_JIS では、htmlspecialchars() を使用しても XSS が可能な場合がある - t_komuraの日記&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-04 23:11:51</published>
  <title> Shift_JIS では、htmlspecialchars() を使用しても XSS が可能な場合がある</title>
  <type>rich</type>
  <url>https://t-komura.hatenadiary.org/entry/20091004/1254665511</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
