Skip to content

Commit

Permalink
Fix Jruby 9.2 & 9.3 with rexml 3.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed May 22, 2024
1 parent ca21fd3 commit b278b8e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ gem 'simplecov-html', '~> 0.10.2' if RUBY_VERSION < '2.4.0'
gem 'warning', '~> 1' if RUBY_VERSION >= '2.5.0'
gem 'webmock', '>= 3.10.0'

gem 'rexml', '>= 3.2.7'
gem 'rexml', '>= 3.2.7' # https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/

gem 'webrick', '>= 1.7.0' if RUBY_VERSION >= '3.0.0' # No longer bundled by default since Ruby 3.0
if RUBY_VERSION >= '2.3.0'
Expand Down
5 changes: 5 additions & 0 deletions appraisal/jruby-9.2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@
appraise 'aws' do
gem 'aws-sdk'
gem 'shoryuken'

# https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/
# `rexml` 3.2.7+ breaks because of strscan incompatibility
# `strsan` 3.1.0 does not fix the issue and raise TypeError when StringScanner#scan is given a string instead of Regexp
gem 'rexml', '= 3.2.6'
end

appraise 'http' do
Expand Down
6 changes: 6 additions & 0 deletions appraisal/jruby-9.3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
appraise 'aws' do
gem 'aws-sdk'
gem 'shoryuken'

# https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/
# `rexml` 3.2.7+ breaks because of strscan incompatibility, which is ported with JRuby 9.3.14.0
# `strsan` 3.1.0 does not fix the issue and raise TypeError when StringScanner#scan is given a string instead of Regexp
# https://www.jruby.org/2024/02/20/jruby-9-3-14-0
gem 'rexml', '= 3.2.6'
end

appraise 'http' do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby_9.2_aws.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions gemfiles/jruby_9.2_aws.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_9.3_aws.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions gemfiles/jruby_9.3_aws.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b278b8e

Please sign in to comment.