无法更新Rest-Client Gem?

时间:2016-02-20 16:08:48

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

捆绑审计报告:

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让我无处可去。

附加背景:

在一个安全意识的时刻,我安装了捆绑审计这个上午,并针对我生产的唯一应用程序运行它。除了我的妻子之外没有人使用它,但我希望它安全(我的情况下的漏洞可能需要登录,这不太可能,但仍然)。 bundle-audit报告了rest-client的两个漏洞,建议升级到1.8.0。捆绑更新不断推出版本1.6.8。我已经查看了我的Gemfile,并且对于任何引入rest-client的gem来说,似乎没有任何明确的版本要求。 (在Gemfile中根本没有对rest-client的引用。)gem dependency 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.

当我将其移除时,它会再次被拉入。

BTW,为什么删除会导致额外的依赖性超出&gem; gem依赖&#39;要弹出? (它们是间接的吗?)

感谢。

1 个答案:

答案 0 :(得分:0)

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

gem "rest-client", "1.6.7"

我刚删除了该版本:

gem "rest-client"

然后运行bundle update rest-client