<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>jonosuke</author_name>
  <author_url>https://blog.hatena.ne.jp/jonosuke/</author_url>
  <blog_title>廟攻</blog_title>
  <blog_url>https://jonosuke.hatenadiary.org/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>PHP</anon>
    <anon>CakePHP</anon>
  </categories>
  <description>RequestHandler-&gt;getClientIP()の事を調べていたら、RequestHandler-&gt;getClientIP()が返す結果は信用できないという記事を見つけました。 CakePHPのgetClientIPを使っていいのは小学生までだよねー 簡単に言うと、HTTP_X_FORWARDED_FORは簡単に偽装できるのに、HTTP_X_FORWARDED_FORに値が設定してあるとその値を返してしまうらしいです。 現在の最新版であるCakePHP 1.2.5ではどうなったかというと、対応されています。 function getClientIP($safe = true) { i…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjonosuke.hatenadiary.org%2Fentry%2F20100314%2Fp1&quot; title=&quot;安全になったRequestHandler-&amp;gt;getClientIP() - 廟攻&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>2010-03-14 00:00:00</published>
  <title>安全になったRequestHandler-&gt;getClientIP()</title>
  <type>rich</type>
  <url>https://jonosuke.hatenadiary.org/entry/20100314/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
