【问题标题】:Installing rails_admin causes SafeYAML warning安装 rails_admin 会导致 SafeYAML 警告
【发布时间】:2014-04-23 22:44:22
【问题描述】:

在“bundle install”命令之后,似乎使用了一些旧版本的 libyaml(见下文)。按照说明不起作用,因为 rails_admin 是一个引擎(我猜)。知道如何解决这个问题吗?

SafeYAML Warning
  ----------------

  You appear to have an outdated version of libyaml (0.1.5) installed on your system.

  Prior to 0.1.6, libyaml is vulnerable to a heap overflow exploit from malicious YAML payloads.

  For more info, see:
  https://www.ruby-lang.org/en/news/2014/03/29/heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525/

  The easiest thing to do right now is probably to update Psych to the latest version and enable
  the 'bundled-libyaml' option, which will install a vendored libyaml with the vulnerability patched:

  gem install psych -- --enable-bundled-libyaml

【问题讨论】:

    标签: ruby-on-rails rails-admin libyaml


    【解决方案1】:

    只需 3 步:

    1. 告诉 bundler 使用特定参数安装 psych

      捆绑配置 build.psych --enable-bundled-libyaml

    2. 在 Gemfile 中指定较新版本的 psych gem(ruby 2.0+ 与 psych 2.0.0 一起提供)

      宝石“心理”,“~> 2.0.5”

    3. 运行捆绑器

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多