Skip to content

Commit 6d5ece1

Browse files
committed
Workaround JRuby Nokogiri issue
1 parent f360e3c commit 6d5ece1

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ gem 'rubocop-rake', '~> 0.6.0', require: false
1414
gem 'simplecov', '~> 0.22', require: false
1515
gem 'simplecov-lcov', '~> 0.8', require: false
1616
gem 'timecop', '~> 0.9', require: false
17+
18+
# TODO: This can be removed once Nokogiri 1.19.0 is released
19+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
20+
git_source(:github) do |repo_name|
21+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
22+
"https://github.com/#{repo_name}.git"
23+
end
24+
gem 'nokogiri', github: 'sparklemotion/nokogiri'
25+
end

UPGRADING.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**IMPORTANT: Please read this section carefully as it contains breaking changes!**
66

7-
### Before upgrading
7+
### Before Upgrading
88

99
Before attempting to upgrade to `2.0.0`:
1010
- Upgrade your project to minimum Ruby 3.0, JRuby 9.4, or TruffleRuby 22.
@@ -18,6 +18,13 @@ settings.security[:signature_method] = XMLSecurity::Document::RSA_SHA256
1818
settings.security[:digest_method] = XMLSecurity::Document::SHA256
1919
```
2020

21+
### JRuby users should upgrade to JRuby 1.19 or later
22+
23+
JRuby users should upgrade to Nokogiri gem version 1.19 or later, to avoid
24+
[this Nokogiri issue affecting how XML is generated on JRuby](https://github.com/sparklemotion/nokogiri/pull/3456).
25+
This issue is likely not critical for most IdPs, but since it is not tested, it is recommended to upgrade.
26+
(At time of writing, Nokogiri 1.19 has not been released, but you can use Github repo `main` branch.)
27+
2128
### Root "OneLogin" namespace changed to "RubySaml"
2229

2330
RubySaml version `2.0.0` changes the root namespace from `OneLogin::RubySaml::` to just `RubySaml::`.

0 commit comments

Comments
 (0)