<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thr3a</author_name>
  <author_url>https://blog.hatena.ne.jp/thr3a/</author_url>
  <blog_title>動かざることバグの如し</blog_title>
  <blog_url>https://blog.turai.work/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>まとめ Ruby 2.6以前ではFile.read()の引数に|から始める文字列を渡すと、それがそのままコマンドとして実行されてしまう ので、WEBアプリケーションで第三者から受け取ったパラメータをFile.read()に渡すのはセキュリティ的に危険 Ruby 2.6.0で修正されたので今後は大丈夫 どういうことか ちょうどRubyKaigi2019の講演聞いている最中の話。実際に挙動を見てみる ~ $ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18] ~ $irb irb(main):001:0&gt; File.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.turai.work%2Fentry%2F20190419%2F1555645699&quot; title=&quot;RubyでFile.read()を使うときは注意が必要だった（過去形） - 動かざることバグの如し&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>2019-04-19 12:48:19</published>
  <title>RubyでFile.read()を使うときは注意が必要だった（過去形）</title>
  <type>rich</type>
  <url>https://blog.turai.work/entry/20190419/1555645699</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
