Skip to content

Commit b0220b8

Browse files
committed
dep: bump Nokogiri dependency to address the foreign style issue
https://hackerone.com/reports/2503220
1 parent cd18b0e commit b0220b8

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

Diff for: Gemfile

-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@ group :rubocop do
1414
gem "rubocop-performance", require: false
1515
gem "rubocop-rails", require: false
1616
end
17-
18-
# specify gem versions for old rubies
19-
gem "nokogiri", ">= 1.7"
20-
gem "activesupport", ">= 5"

Diff for: Gemfile.lock

+4-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PATH
33
specs:
44
rails-html-sanitizer (1.6.0)
55
loofah (~> 2.21)
6-
nokogiri (~> 1.14)
6+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
77

88
GEM
99
remote: https://rubygems.org/
@@ -34,18 +34,10 @@ GEM
3434
loofah (2.22.0)
3535
crass (~> 1.0.2)
3636
nokogiri (>= 1.12.0)
37+
mini_portile2 (2.8.8)
3738
minitest (5.24.1)
38-
nokogiri (1.16.7-aarch64-linux)
39-
racc (~> 1.4)
40-
nokogiri (1.16.7-arm-linux)
41-
racc (~> 1.4)
42-
nokogiri (1.16.7-arm64-darwin)
43-
racc (~> 1.4)
44-
nokogiri (1.16.7-x86-linux)
45-
racc (~> 1.4)
46-
nokogiri (1.16.7-x86_64-darwin)
47-
racc (~> 1.4)
48-
nokogiri (1.16.7-x86_64-linux)
39+
nokogiri (1.16.8)
40+
mini_portile2 (~> 2.8.2)
4941
racc (~> 1.4)
5042
parallel (1.26.2)
5143
parser (3.3.4.2)
@@ -98,9 +90,7 @@ PLATFORMS
9890
x86_64-linux
9991

10092
DEPENDENCIES
101-
activesupport (>= 5)
10293
minitest
103-
nokogiri (>= 1.7)
10494
rails-html-sanitizer!
10595
rake
10696
rubocop (>= 1.25.1)

Diff for: rails-html-sanitizer.gemspec

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ Gem::Specification.new do |spec|
2626
spec.test_files = Dir["test/**/*"]
2727
spec.require_paths = ["lib"]
2828

29-
# NOTE: There's no need to update dependencies for CVEs in minor releases
30-
# when users can simply run `bundle update loofah`.
3129
spec.add_dependency "loofah", "~> 2.21"
32-
spec.add_dependency "nokogiri", "~> 1.14"
30+
31+
# A fix was shipped in nokogiri v1.15.7 and v1.16.8 without which there is a vulnerability in this gem.
32+
spec.add_dependency "nokogiri", [">=1.15.7",
33+
"!=1.16.0", "!=1.16.0.rc1", "!=1.16.1", "!=1.16.2", "!=1.16.3",
34+
"!=1.16.4", "!=1.16.5", "!=1.16.6", "!=1.16.7"]
3335
end

0 commit comments

Comments
 (0)