【问题标题】:Can't Update Rest-Client Gem?无法更新 Rest-Client Gem?
【发布时间】:2016-02-20 16:08:47
【问题描述】:

捆绑审计报告:

Name: rest-client
Version: 1.6.8
Advisory: CVE-2015-1820
Criticality: Unknown
URL: https://github.com/rest-client/rest-client/issues/369
Title: rubygem-rest-client: session fixation vulnerability via Set-Cookie headers in 30x redirection responses
Solution: upgrade to >= 1.8.0

但是当我尝试更新到 1.8.0 的时候,却发现有各种依赖无法到 1.8.0

我错过了什么?我的 Google-foo 让我无处可去。

附加上下文:

出于安全考虑,我在这个 AM 上安装了 bundle-audit,并针对我在 prod 中唯一的应用程序运行它。除了我的妻子,其他人都没有使用它,但我希望它是安全的(在我的情况下,这个漏洞可能需要登录,这不太可能,但仍然如此)。 bundle-audit 报告了 rest-client 的两个漏洞,并建议升级到 1.8.0。捆绑更新不断拉入版本 1.6.8。我已经查看了我的 Gemfile,对于任何引入 rest-client 的 gem 似乎都没有任何明确的版本要求。 (Gemfile 中根本没有提到 rest-client。) gem 依赖 rest-client 1.6.8 将 webmock 和 mime-types 显示为依赖:

gem rest-client-1.6.8
  mime-types (~> 1.16)
  pry (>= 0, development)
  rake (~> 10.0, development)
  rdoc (>= 2.4.2)
  rspec (~> 2.4, development)
  webmock (~> 1.4, development)

Gem rest-client-1.8.0
  http-cookie (< 2.0, >= 1.0.2)
  mime-types (< 3.0, >= 1.16)
  netrc (~> 0.7)
  pry (>= 0, development)
  pry-doc (>= 0, development)
  rdoc (< 5.0, >= 2.4.2, development)
  rspec (~> 2.4, development)
  webmock (~> 1.4, development)

当我尝试删除 rest-client 1.68 时,gem 抱怨不同:

ast-2.1.0 depends on rest-client (~> 1.6.7, development)
heroku-3.42.36 depends on rest-client (= 1.6.8)
heroku-3.42.33 depends on rest-client (= 1.6.8)
heroku-3.42.21 depends on rest-client (= 1.6.8)
heroku-3.8.4 depends on rest-client (~> 1.6.1)
heroku-3.8.3 depends on rest-client (~> 1.6.1)
heroku-3.8.2 depends on rest-client (~> 1.6.1)
heroku-3.8.1 depends on rest-client (~> 1.6.1)
heroku-3.6.0 depends on rest-client (~> 1.6.1)
heroku-3.3.0 depends on rest-client (~> 1.6.1)
heroku-3.2.3 depends on rest-client (~> 1.6.1)
heroku-3.0.1 depends on rest-client (~> 1.6.1)
parser-2.2.3.0 depends on rest-client (~> 1.6.7, development)
parser-2.2.2.6 depends on rest-client (~> 1.6.7, development)
parser-2.2.0.3 depends on rest-client (~> 1.6.7, development)
If you remove this gem, these dependencies will not be met.

当我移除它时,它又被拉入。

顺便说一句,为什么删除会导致弹出“gem 依赖项”报告之外的其他依赖项? (它们是间接的吗?)

谢谢。

【问题讨论】:

    标签: ruby-on-rails heroku rubygems bundler rest-client


    【解决方案1】:

    我知道你在一年前发布了这个,但我遇到了同样的问题,所以我遇到了它。对我来说,问题是在我的 Gemfile 中我有:

    gem "rest-client", "1.6.7"
    

    我刚刚删除了版本:

    gem "rest-client"
    

    然后跑bundle update rest-client

    【讨论】:

    • 谢谢 A. Saloff。我不知道我做了什么,但你的评论很有价值。
    猜你喜欢
    • 2019-09-18
    • 1970-01-01
    • 2019-06-15
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多