zync
zync copied to clipboard
🚨 [security] Update nokogiri: 1.12.3 → 1.13.6 (minor)
🚨 Your current dependencies have known security vulnerabilities 🚨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
↗️ nokogiri (indirect, 1.12.3 → 1.13.6) · Repo · Changelog
Security Advisories 🚨
🚨 Improper Handling of Unexpected Data Type in Nokogiri
Summary
Nokogiri
< v1.13.6
does not type-check all inputs into the XML and HTML4 SAX parsers.
For CRuby users, this may allow specially crafted untrusted inputs to cause illegal
memory access errors (segfault) or reads from unrelated memory.Severity
The Nokogiri maintainers have evaluated this as High 8.2 (CVSS3.1).
Mitigation
CRuby users should upgrade to Nokogiri
>= 1.13.6
.JRuby users are not affected.
Workarounds
To avoid this vulnerability in affected applications, ensure the untrusted input is a
String
by calling#to_s
or equivalent.
🚨 Integer Overflow or Wraparound in libxml2 affects Nokogiri
Summary
Nokogiri v1.13.5 upgrades the packaged version of its dependency libxml2 from
v2.9.13 to v2.9.14.libxml2 v2.9.14 addresses CVE-2022-29824.
This version also includes several security-related bug fixes for which CVEs were not created,
including a potential double-free, potential memory leaks, and integer-overflow.Please note that this advisory only applies to the CRuby implementation of Nokogiri
< 1.13.5
, and only if the packaged libraries are being used. If you've overridden
defaults at installation time to use system libraries instead of packaged libraries,
you should instead pay attention to your distro'slibxml2
andlibxslt
release announcements.Mitigation
Upgrade to Nokogiri
>= 1.13.5
.Users who are unable to upgrade Nokogiri may also choose a more complicated mitigation:
compile and link Nokogiri against external libraries libxml2>= 2.9.14
which will also
address these same issues.Impact
libxml2 CVE-2022-29824
- CVSS3 score:
- Unspecified upstream
- Nokogiri maintainers evaluate at 8.6 (High) (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H). Note that this is different from the CVSS assessed by NVD.
- Type: Denial of service, information disclosure
- Description: In libxml2 before 2.9.14, several buffer handling functions in buf.c (xmlBuf*) and tree.c (xmlBuffer*) don't check for integer overflows. This can result in out-of-bounds memory writes. Exploitation requires a victim to open a crafted, multi-gigabyte XML file. Other software using libxml2's buffer functions, for example libxslt through 1.1.35, is affected as well.
- Fixed: https://gitlab.gnome.org/GNOME/libxml2/-/commit/2554a24
All versions of libml2 prior to v2.9.14 are affected.
Applications parsing or serializing multi-gigabyte documents (in excess of INT_MAX bytes) may be vulnerable to an integer overflow bug in buffer handling that could lead to exposure of confidential data, modification of unrelated data, or a segmentation fault resulting in a denial-of-service.
References
🚨 Denial of Service (DoS) in Nokogiri on JRuby
Summary
Nokogiri
v1.13.4
updates the vendoredorg.cyberneko.html
library to
1.9.22.noko2
which addresses CVE-2022-24839.
That CVE is rated 7.5 (High Severity).See GHSA-9849-p7jc-9rmv
for more information.Please note that this advisory only applies to the JRuby implementation of Nokogiri
< 1.13.4
.Mitigation
Upgrade to Nokogiri
>= 1.13.4
.Impact
CVE-2022-24839 in nekohtml
- Severity: High 7.5
- Type: CWE-400 Uncontrolled Resource Consumption
- Description: The fork of
org.cyberneko.html
used by Nokogiri (Rubygem) raises a
java.lang.OutOfMemoryError
exception when parsing ill-formed HTML markup.- See also: GHSA-9849-p7jc-9rmv
🚨 XML Injection in Xerces Java affects Nokogiri
Summary
Nokogiri v1.13.4 updates the vendored
xerces:xercesImpl
from 2.12.0 to
2.12.2, which addresses CVE-2022-23437.
That CVE is scored as CVSS 6.5 "Medium" on the NVD record.Please note that this advisory only applies to the JRuby implementation
of Nokogiri< 1.13.4
.Mitigation
Upgrade to Nokogiri
>= v1.13.4
.Impact
CVE-2022-23437 in xerces-J
- Severity: Medium
- Type: CWE-91 XML Injection (aka Blind XPath Injection)
- Description: There's a vulnerability within the Apache Xerces Java
(XercesJ) XML parser when handling specially crafted XML document payloads.
This causes, the XercesJ XML parser to wait in an infinite loop, which may
sometimes consume system resources for prolonged duration. This vulnerability
is present within XercesJ version 2.12.1 and the previous versions.- See also: GHSA-h65f-jvqw-m9fj
🚨 Out-of-bounds Write in zlib affects Nokogiri
Summary
Nokogiri v1.13.4 updates the vendored zlib from 1.2.11
to 1.2.12, which addresses CVE-2018-25032.
That CVE is scored as CVSS 7.4 "High" on the NVD record as of 2022-04-05.Please note that this advisory only applies to the CRuby implementation of
Nokogiri< 1.13.4
, and only if the packaged version ofzlib
is being used.
Please see this document
for a complete description of which platform gems vendorzlib
. If you've
overridden defaults at installation time to use system libraries instead of
packaged libraries, you should instead pay attention to your distro'szlib
release announcements.Mitigation
Upgrade to Nokogiri
>= v1.13.4
.Impact
CVE-2018-25032 in zlib
- Severity: High
- Type: CWE-787
Out of bounds write- Description: zlib before 1.2.12 allows memory corruption when
deflating (i.e., when compressing) if the input has many distant matches.
🚨 Inefficient Regular Expression Complexity in Nokogiri
Summary
Nokogiri
< v1.13.4
contains an inefficient regular expression that is
susceptible to excessive backtracking when attempting to detect encoding
in HTML documents.Mitigation
Upgrade to Nokogiri
>= 1.13.4
.
🚨 Update packaged libxml2 (2.9.12 → 2.9.13) and libxslt (1.1.34 → 1.1.35)
Summary
Nokogiri v1.13.2 upgrades two of its packaged dependencies:
- vendored libxml2 from v2.9.12 to v2.9.13
- vendored libxslt from v1.1.34 to v1.1.35
Those library versions address the following upstream CVEs:
- libxslt: CVE-2021-30560 (CVSS 8.8, High severity)
- libxml2: CVE-2022-23308 (Unspecified severity, see more information below)
Those library versions also address numerous other issues including performance
improvements, regression fixes, and bug fixes, as well as memory leaks and other
use-after-free issues that were not assigned CVEs.Please note that this advisory only applies to the CRuby implementation of
Nokogiri < 1.13.2, and only if the packaged libraries are being used. If you've
overridden defaults at installation time to use system libraries instead of
packaged libraries, you should instead pay attention to your distro'slibxml2
andlibxslt
release announcements.Mitigation
Upgrade to Nokogiri >= 1.13.2.
Users who are unable to upgrade Nokogiri may also choose a more complicated
mitigation: compile and link an older version Nokogiri against external libraries
libxml2 >= 2.9.13 and libxslt >= 1.1.35, which will also address these same CVEs.Impact
- libxslt CVE-2021-30560
- CVSS3 score: 8.8 (High)
Fixed by https://gitlab.gnome.org/GNOME/libxslt/-/commit/50f9c9c
All versions of libxslt prior to v1.1.35 are affected.
Applications using untrusted XSL stylesheets to transform XML are vulnerable to
a denial-of-service attack and should be upgraded immediately.libxml2 CVE-2022-23308
- As of the time this security advisory was published, there is no officially
published information available about this CVE's severity. The above NIST link
does not yet have a published record, and the libxml2 maintainer has declined
to provide a severity score.- Fixed by https://gitlab.gnome.org/GNOME/libxml2/-/commit/652dd12
- Further explanation is at https://mail.gnome.org/archives/xml/2022-February/msg00015.html
The upstream commit and the explanation linked above indicate that an application
may be vulnerable to a denial of service, memory disclosure, or code execution if
it parses an untrusted document with parse optionsDTDVALID
set to true, andNOENT
set to false.An analysis of these parse options:
- While
NOENT
is off by default for Document, DocumentFragment, Reader, and
Schema parsing, it is on by default for XSLT (stylesheet) parsing in Nokogiri
v1.12.0 and later.DTDVALID
is an option that Nokogiri does not set for any operations, and so
this CVE applies only to applications setting this option explicitly.It seems reasonable to assume that any application explicitly setting the parse
optionDTDVALID
when parsing untrusted documents is vulnerable and should be
upgraded immediately.
🚨 Improper Restriction of XML External Entity Reference (XXE) in Nokogiri on JRuby
Severity
The Nokogiri maintainers have evaluated this as High Severity 7.5 (CVSS3.0) for JRuby users. (This security advisory does not apply to CRuby users.)
Impact
In Nokogiri v1.12.4 and earlier, on JRuby only, the SAX parser resolves external entities by default.
Users of Nokogiri on JRuby who parse untrusted documents using any of these classes are affected:
- Nokogiri::XML::SAX::Parser
- Nokogiri::HTML4::SAX::Parser or its alias Nokogiri::HTML::SAX::Parser
- Nokogiri::XML::SAX::PushParser
- Nokogiri::HTML4::SAX::PushParser or its alias Nokogiri::HTML::SAX::PushParser
Mitigation
JRuby users should upgrade to Nokogiri v1.12.5 or later. There are no workarounds available for v1.12.4 or earlier.
CRuby users are not affected.
Release Notes
1.13.6
1.13.6 / 2022-05-08
Security
- [CRuby] Address CVE-2022-29181, improper handling of unexpected data types, related to untrusted inputs to the SAX parsers. See GHSA-xh29-r2w5-wx8m for more information.
Improvements
{HTML4,XML}::SAX::{Parser,ParserContext}
constructor methods now raiseTypeError
instead of segfaulting when an incorrect type is passed.
sha256:
58417c7c10f78cd1c0e1984f81538300d4ea98962cfd3f46f725efee48f9757a nokogiri-1.13.6-aarch64-linux.gem a2b04ec3b1b73ecc6fac619b41e9fdc70808b7a653b96ec97d04b7a23f158dbc nokogiri-1.13.6-arm64-darwin.gem 4437f2d03bc7da8854f4aaae89e24a98cf5c8b0212ae2bc003af7e65c7ee8e27 nokogiri-1.13.6-java.gem 99d3e212bbd5e80aa602a1f52d583e4f6e917ec594e6aa580f6aacc253eff984 nokogiri-1.13.6-x64-mingw-ucrt.gem a04f6154a75b6ed4fe2d0d0ff3ac02f094b54e150b50330448f834fa5726fbba nokogiri-1.13.6-x64-mingw32.gem a13f30c2863ef9e5e11240dd6d69ef114229d471018b44f2ff60bab28327de4d nokogiri-1.13.6-x86-linux.gem 63a2ca2f7a4f6bd9126e1695037f66c8eb72ed1e1740ef162b4480c57cc17dc6 nokogiri-1.13.6-x86-mingw32.gem 2b266e0eb18030763277b30dc3d64337f440191e2bd157027441ac56a59d9dfe nokogiri-1.13.6-x86_64-darwin.gem 3fa37b0c3b5744af45f9da3e4ae9cbd89480b35e12ae36b5e87a0452e0b38335 nokogiri-1.13.6-x86_64-linux.gem b1512fdc0aba446e1ee30de3e0671518eb363e75fab53486e99e8891d44b8587 nokogiri-1.13.6.gem
1.13.5
1.13.5 / 2022-05-04
Security
- [CRuby] Vendored libxml2 is updated to address CVE-2022-29824. See GHSA-cgx6-hpwq-fhv5 for more information.
Dependencies
- [CRuby] Vendored libxml2 is updated from v2.9.13 to v2.9.14.
Improvements
- [CRuby] The libxml2 HTML4 parser no longer exhibits quadratic behavior when recovering some broken markup related to start-of-tag and bare
<
characters.Changed
- [CRuby] The libxml2 HTML4 parser in v2.9.14 recovers from some broken markup differently. Notably, the XML CDATA escape sequence
<![CDATA[
and incorrectly-opened comments will result in HTML text nodes starting with<!
instead of skipping the invalid tag. This behavior is a direct result of the quadratic-behavior fix noted above. The behavior of downstream sanitizers relying on this behavior will also change. Some tests describing the changed behavior are intest/html4/test_comments.rb
.
sha256sum:
aa1bfd0fd0b33110729d4a063b7b02de9419c559eb48a1f8940b74fc638d60ea nokogiri-1.13.5-aarch64-linux.gem d0b872786d6c2b44c10a389e585a77c07274a2b5e7211a470f76909c0711f218 nokogiri-1.13.5-arm64-darwin.gem 3f1434c198f0daf46d24c4696a53504beb69b8c15efe0548a7aa17a8378be21d nokogiri-1.13.5-java.gem 0e60dc107c7e289dd3817acff14a12c9f4447a994a2411f772d6dd1220a35ae6 nokogiri-1.13.5-x64-mingw-ucrt.gem c9897dd7236738d260b66ac99ea93950fd3a6375f11a9927bf345eec4ec1fde6 nokogiri-1.13.5-x64-mingw32.gem a81586845f99a16a85586717b0051ce1508a68722a56486582ab09b3255d3b17 nokogiri-1.13.5-x86-linux.gem e2abaef3af396adee3b0995693d5e690eb826782f7ecddf8b1b6a5a706075cff nokogiri-1.13.5-x86-mingw32.gem 19360ba28f31562691926d1c542c783fc0ed5f2a145f1329206f8c09e46a85ea nokogiri-1.13.5-x86_64-darwin.gem a598598163233ee907472808c0bc7ae4354999e77409e1711b61406066a7afb4 nokogiri-1.13.5-x86_64-linux.gem e15570ec6d46921a3de5f5b057b027cc0c4f32775353c00e8c8dfbe443741e78 nokogiri-1.13.5.gem
1.13.4
1.13.4 / 2022-04-11
Security
- Address CVE-2022-24836, a regular expression denial-of-service vulnerability. See GHSA-crjr-9rc5-ghw8 for more information.
- [CRuby] Vendored zlib is updated to address CVE-2018-25032. See GHSA-v6gp-9mmm-c6p5 for more information.
- [JRuby] Vendored Xerces-J (
xerces:xercesImpl
) is updated to address CVE-2022-23437. See GHSA-xxx9-3xcr-gjj3 for more information.- [JRuby] Vendored nekohtml (
org.cyberneko.html
) is updated to address CVE-2022-24839. See GHSA-gx8x-g87m-h5q6 for more information.Dependencies
- [CRuby] Vendored zlib is updated from 1.2.11 to 1.2.12. (See LICENSE-DEPENDENCIES.md for details on which packages redistribute this library.)
- [JRuby] Vendored Xerces-J (
xerces:xercesImpl
) is updated from 2.12.0 to 2.12.2.- [JRuby] Vendored nekohtml (
org.cyberneko.html
) is updated from a fork of 1.9.21 to 1.9.22.noko2. This fork is now publicly developed at https://github.com/sparklemotion/nekohtml
sha256sum:
095ff1995ed3dda3ea98a5f08bdc54bef02be1ce4e7c81034c4812e5e7c6e7e3 nokogiri-1.13.4-aarch64-linux.gem 7ebfc7415c819bcd4e849627e879cef2fb328bec90e802e50d74ccd13a60ec75 nokogiri-1.13.4-arm64-darwin.gem 41efd87c121991de26ef0393ac713d687e539813c3b79e454a2e3ffeecd107ea nokogiri-1.13.4-java.gem ab547504692ada0cec9d2e4e15afab659677c3f4c1ac3ea639bf5212b65246a1 nokogiri-1.13.4-x64-mingw-ucrt.gem fa5c64cfdb71642ed647428e4d0d75ee0f4d189cfb63560c66fd8bdf99eb146b nokogiri-1.13.4-x64-mingw32.gem d6f07cbcbc28b75e8ac5d6e729ffba3602dffa0ad16ffac2322c9b4eb9b971fc nokogiri-1.13.4-x86-linux.gem 0f7a4fd13e25abe3f98663fef0d115d58fdeff62cf23fef12d368e42adad2ce6 nokogiri-1.13.4-x86-mingw32.gem 3eef282f00ad360304fbcd5d72eb1710ff41138efda9513bb49eec832db5fa3e nokogiri-1.13.4-x86_64-darwin.gem 3978610354ec67b59c128d23259c87b18374ee1f61cb9ed99de7143a88e70204 nokogiri-1.13.4-x86_64-linux.gem 0d46044eb39271e3360dae95ed6061ce17bc0028d475651dc48db393488c83bc nokogiri-1.13.4.gem
1.13.3
1.13.3 / 2022-02-21
Fixed
- [CRuby] Revert a HTML4 parser bug in libxml 2.9.13 (introduced in Nokogiri v1.13.2). The bug causes libxml2's HTML4 parser to fail to recover when encountering a bare
<
character in some contexts. This version of Nokogiri restores the earlier behavior, which is to recover from the parse error and treat the<
as normal character data (which will be serialized as<
in a text node). The bug (and the fix) is only relevant when theRECOVER
parse option is set, as it is by default. [#2461]
SHA256 checksums:
025a4e333f6f903072a919f5f75b03a8f70e4969dab4280375b73f9d8ff8d2c0 nokogiri-1.13.3-aarch64-linux.gem b9cb59c6a6da8cf4dbee5dbb569c7cc95a6741392e69053544e0f40b15ab9ad5 nokogiri-1.13.3-arm64-darwin.gem e55d18cee64c19d51d35ad80634e465dbcdd46ac4233cb42c1e410307244ebae nokogiri-1.13.3-java.gem 53e2d68116cd00a873406b8bdb90c78a6f10e00df7ddf917a639ac137719b67b nokogiri-1.13.3-x64-mingw-ucrt.gem b5f39ebb662a1be7d1c61f8f0a2a683f1bb11690a6f00a99a1aa23a071f80145 nokogiri-1.13.3-x64-mingw32.gem 7c0de5863aace4bbbc73c4766cf084d1f0b7a495591e46d1666200cede404432 nokogiri-1.13.3-x86-linux.gem 675cc3e7d7cca0d6790047a062cd3aa3eab59e3cb9b19374c34f98bade588c66 nokogiri-1.13.3-x86-mingw32.gem f445596a5a76941a9d1980747535ab50d3399d1b46c32989bc26b7dd988ee498 nokogiri-1.13.3-x86_64-darwin.gem 3f6340661c2a283b337d227ea224f859623775b2f5c09a6bf197b786563958df nokogiri-1.13.3-x86_64-linux.gem bf1b1bceff910abb0b7ad825535951101a0361b859c2ad1be155c010081ecbdc nokogiri-1.13.3.gem
1.13.2
1.13.2 / 2022-02-21
Security
- [CRuby] Vendored libxml2 is updated from 2.9.12 to 2.9.13. This update addresses CVE-2022-23308.
- [CRuby] Vendored libxslt is updated from 1.1.34 to 1.1.35. This update addresses CVE-2021-30560.
Please see GHSA-fq42-c5rg-92c2 for more information about these CVEs.
Dependencies
- [CRuby] Vendored libxml2 is updated from 2.9.12 to 2.9.13. Full changelog is available at https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.13.news
- [CRuby] Vendored libxslt is updated from 1.1.34 to 1.1.35. Full changelog is available at https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.35.news
SHA256 checksums:
63469a9bb56a21c62fbaea58d15f54f8f167ff6fde51c5c2262072f939926fdd nokogiri-1.13.2-aarch64-linux.gem 2986617f982f645c06f22515b721e6d2613dd69493e5c41ddd03c4830c3b3065 nokogiri-1.13.2-arm64-darwin.gem aca1d66206740b29d0d586b1d049116adcb31e6cdd7c4dd3a96eb77da215a0c4 nokogiri-1.13.2-java.gem b9e4eea1a200d9a927a5bc7d662c427e128779cba0098ea49ddbdb3ffc3ddaec nokogiri-1.13.2-x64-mingw-ucrt.gem 48d5493fec495867c5516a908a068c1387a1d17c5aeca6a1c98c089d9d9fdcf8 nokogiri-1.13.2-x64-mingw32.gem 62034d7aaaa83fbfcb8876273cc5551489396841a66230d3200b67919ef76cf9 nokogiri-1.13.2-x86-linux.gem e07237b82394017c2bfec73c637317ee7dbfb56e92546151666abec551e46d1d nokogiri-1.13.2-x86-mingw32.gem 01937a6551d997aca32468da08ced0878ba4e1dfd0b51d953617185eefc57ffa nokogiri-1.13.2-x86_64-darwin.gem 70112ae29939d4b5e1c8ba13e1f0d82ff43cd5564ce138f622fe6ebddc503654 nokogiri-1.13.2-x86_64-linux.gem def6b330c53dcabe8b7d545cf9db4dfb45e9d39040b531eb81aee0c840fd66c2 nokogiri-1.13.2.gem
1.13.1
1.13.1 / 2022-01-13
Fixed
- Fix
Nokogiri::XSLT.quote_params
regression in v1.13.0 that raised an exception when non-string stylesheet parameters were passed. Non-string parameters (e.g., integers and symbols) are now explicitly supported and both keys and values will be stringified with#to_s
. [#2418]- Fix HTML5 CSS selector query regression in v1.13.0 that raised an
Nokogiri::XML::XPath::SyntaxError
when parsing XPath attributes mixed into the CSS query. Although this mash-up of XPath and CSS syntax previously worked unintentionally, it is now an officially supported feature and is documented as such. [#2419]
SHA265 checksums
9206569b36f0066f943f174a832b50e69551c2a81333b7a62d4073e97ea4c3c6 nokogiri-1.13.1-aarch64-linux.gem 39d73197506acd3748c84600e000bb44ccd930695a9fc8b489b1b4df37dd14f0 nokogiri-1.13.1-arm64-darwin.gem 1aaa315876e2049b4418c60794f1f55bdb04cc9583b9b664dbb3c52696695207 nokogiri-1.13.1-java.gem 37d97e5fdaae4a14cc7122598616ac484d71c271004fb6cce6684c6734f41552 nokogiri-1.13.1-x64-mingw-ucrt.gem 683b030957c747d35499f8d766cad51a31ae9456098225af62fab7b27fe20129 nokogiri-1.13.1-x64-mingw32.gem 690958426e3151ba0c22e8d88637dba5e0c636107f3def2ffc10e334d451e61f nokogiri-1.13.1-x86-linux.gem 30f94872729a1bbd41d6e2080bb0d48f4137a1323530263fd88299b41666ca06 nokogiri-1.13.1-x86-mingw32.gem 1fa3a5c9a460292ff03c7347185d2c394978c94fc96fd414bbfa8cef3eac7d72 nokogiri-1.13.1-x86_64-darwin.gem 843a379997c88a1b3d7524cd27b3ee652444f5371ff449af09929602fa26dfb5 nokogiri-1.13.1-x86_64-linux.gem 2138bb8e1bd5f11c2dc57a6a7ed93ddce35825dae7d25262658d89a222571fff nokogiri-1.13.1.gem
1.13.0
1.13.0 / 2022-01-06
Notes
Ruby
This release introduces native gem support for Ruby 3.1. Please note that Windows users should use the
x64-mingw-ucrt
platform gem for Ruby 3.1, andx64-mingw32
for Ruby 2.6–3.0 (see RubyInstaller 3.1.0 release notes).This release ends support for:
- Ruby 2.5, for which official support ended 2021-03-31.
- JRuby 9.2, which is a Ruby 2.5-compatible release.
Faster, more reliable installation: Native Gem for ARM64 Linux
This version of Nokogiri ships experimental native gem support for the
aarch64-linux
platform, which should support AWS Graviton and other ARM Linux platforms. We don't yet have CI running for this platform, and so we're interested in hearing back from y'all whether this is working, and what problems you're seeing. Please send us feedback here: Feedback: Have you used theaarch64-linux
native gem?Publishing
This version of Nokogiri opts-in to the "MFA required to publish" setting on Rubygems.org. This and all future Nokogiri gem files must be published to Rubygems by an account with multi-factor authentication enabled. This should provide some additional protection against supply-chain attacks.
A related discussion about Trust exists at #2357 in which I invite you to participate if you have feelings or opinions on this topic.
Dependencies
- [CRuby] Vendored libiconv is updated from 1.15 to 1.16. (Note that libiconv is only redistributed in the native windows and native darwin gems, see
LICENSE-DEPENDENCIES.md
for more information.) [#2206]- [CRuby] Upgrade mini_portile2 dependency from
~> 2.6.1
to~> 2.7.0
. ("ruby" platform gem only.)Improved
{XML,HTML4}::DocumentFragment
constructors all now take an optional parse options parameter or block (similar to Document constructors). [#1692] (Thanks, @JackMc!)Nokogiri::CSS.xpath_for
allows anXPathVisitor
to be injected, for finer-grained control over how CSS queries are translated into XPath.- [CRuby]
XML::Reader#encoding
will return the encoding detected by the parser when it's not passed to the constructor. [#980]- [CRuby] Handle abruptly-closed HTML comments as recommended by WHATWG. (Thanks to tehryanx for reporting!)
- [CRuby]
Node#line
is no longer capped at 65535. libxml v2.9.0 and later support a new parse option, exposed asNokogiri::XML::ParseOptions::PARSE_BIG_LINES
, which is turned on by default inParseOptions::DEFAULT_{XML,XSLT,HTML,SCHEMA}
(Note that JRuby already supported large line numbers.) [#1764, #1493, #1617, #1505, #1003, #533]- [CRuby] If a cycle is introduced when reparenting a node (i.e., the node becomes its own ancestor), a
RuntimeError
is raised. libxml2 does no checking for this, which means cycles would otherwise result in infinite loops on subsequent operations. (Note that JRuby already did this.) [#1912]- [CRuby] Source builds will download zlib and libiconv via HTTPS. ("ruby" platform gem only.) [#2391] (Thanks, @jmartin-r7!)
- [JRuby]
Node#line
behavior has been modified to return the line number of the node in the final DOM structure. This behavior is different from CRuby, which returns the node's position in the input string. Ideally the two implementations would be the same, but at least is now officially documented and tested. The real-world impact of this change is that the value returned in JRuby is greater by 1 to account for the XML prolog in the output. [#2380] (Thanks, @dabdine!)Fixed
- CSS queries on HTML5 documents now correctly match foreign elements (SVG, MathML) when namespaces are not specified in the query. [#2376]
XML::Builder
blocks restore context properly when exceptions are raised. [#2372] (Thanks, @ric2b and @rinthedev!)- The
Nokogiri::CSS::Parser
cache now uses theXPathVisitor
configuration as part of the cache key, preventing incorrect cache results from being returned when multipleXPathVisitor
options are being used.- Error recovery from in-context parsing (e.g.,
Node#parse
) now always uses the correctDocumentFragment
class. PreviouslyNokogiri::HTML4::DocumentFragment
was always used, even for XML documents. [#1158]DocumentFragment#>
now works properly, matching a CSS selector against only the fragment roots. [#1857]XML::DocumentFragment#errors
now correctly contains any parsing errors encountered. Previously this was always empty. (Note thatHTML::DocumentFragment#errors
already did this.)- [CRuby] Fix memory leak in
Document#canonicalize
when inclusive namespaces are passed in. [#2345]- [CRuby] Fix memory leak in
Document#canonicalize
when an argument type error is raised. [#2345]- [CRuby] Fix memory leak in
EncodingHandler
where iconv handlers were not being cleaned up. [#2345]- [CRuby] Fix memory leak in XPath custom handlers where string arguments were not being cleaned up. [#2345]
- [CRuby] Fix memory leak in
Reader#base_uri
where the string returned by libxml2 was not freed. [#2347]- [JRuby] Deleting a
Namespace
from aNodeSet
no longer modifies thehref
to be the default namespace URL.- [JRuby] Fix XHTML formatting of closing tags for non-container elements. [#2355]
Deprecated
- Passing a
Nokogiri::XML::Node
as the second parameter toNode.new
is deprecated and will generate a warning. This parameter should be a kind ofNokogiri::XML::Document
. This will become an error in a future version of Nokogiri. [#975]Nokogiri::CSS::Parser
,Nokogiri::CSS::Tokenizer
, andNokogiri::CSS::Node
are now internal-only APIs that are no longer documented, and should not be considered stable. With the introduction ofXPathVisitor
injection intoNokogiri::CSS.xpath_for
there should be no reason to rely on these internal APIs.- CSS-to-XPath utility classes
Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins
andXPathVisitorOptimallyUseBuiltins
are deprecated. PreferNokogiri::CSS::XPathVisitor
with appropriate constructor arguments. These classes will be removed in a future version of Nokogiri.
SHA256 checksums:
d147a8feff7faa67de26b152a303a0bbad8ea77ab75e64f4ccf3614b12641dbc nokogiri-1.13.0-aarch64-linux.gem 4455dcfedeee00e1b02ddc1df5cf1fc60b72b5bae9ca53d234c85d48b169894e nokogiri-1.13.0-arm64-darwin.gem 1a0283e525c74b97cf84d60a842e978d98a00789115e4d528d7784551909ff70 nokogiri-1.13.0-java.gem c575d5b22132c78b95279cff259aa21fbb2f185fc7e6967c886138ba2d7286c4 nokogiri-1.13.0-x64-mingw-ucrt.gem 0607ce088cac95e7bde9d05ad9c5e8b7c342628228bca8302b966c456e9f6160 nokogiri-1.13.0-x64-mingw32.gem d313b61192a23793af5b5ca469ec80561933cf4fa958a0106df9dcf031e76077 nokogiri-1.13.0-x86-linux.gem dc5f9ee89b297d4f7c1e53de295243b9e6d175d5042960ea5d001eb1b1df1fd7 nokogiri-1.13.0-x86-mingw32.gem 039372ceb6e5903f70cc5a960a7d141455b2480e0d268234f14bde69347c571c nokogiri-1.13.0-x86_64-darwin.gem 03b95ba61c3b7f85d79f99f30e1dd907548dd980e502cdc5eeccfa5db9aafb3b nokogiri-1.13.0-x86_64-linux.gem 8dbd691d438dc12dadc3d8b5b7ed0a6e64d84a2d65b392b52dce868fda107db3 nokogiri-1.13.0.gem
1.12.5
1.12.5 / 2021-09-27
Security
[JRuby] Address CVE-2021-41098 (GHSA-2rr5-8q37-2w7h).
In Nokogiri v1.12.4 and earlier, on JRuby only, the SAX parsers resolve external entities (XXE) by default. This fix turns off entity-resolution-by-default in the JRuby SAX parsers to match the CRuby SAX parsers' behavior.
CRuby users are not affected by this CVE.
Fixed
- [CRuby]
Document#to_xhtml
properly serializes self-closing tags in libxml > 2.9.10. A behavior change introduced in libxml 2.9.11 resulted in emitting start and and tags (e.g.,<br></br>
) instead of a self-closing tag (e.g.,<br/>
) in previous Nokogiri versions. [#2324]
SHA256 checksums:
36bfa3a07aced069b3f3c9b39d9fb62cb0728d284d02b079404cd55780beaeff nokogiri-1.12.5-arm64-darwin.gem 16b1a9ddbb70a9c998462912a5972097cbc79c3e01eb373906886ef8a469f589 nokogiri-1.12.5-java.gem 218dcc6edd1b49cc6244b5f88afb978739bb2f3f166c271557fe5f51e4bc713c nokogiri-1.12.5-x64-mingw32.gem e33bb919d64c16d931a5f26dc880969e587d225cfa97e6b56e790fb52179f527 nokogiri-1.12.5-x86-linux.gem e13c2ed011b8346fbd589e96fe3542d763158bc2c7ad0f4f55f6d801afd1d9ff nokogiri-1.12.5-x86-mingw32.gem 1ed64f7db7c1414b87fce28029f2a10128611d2037e0871ba298d00f9a00edd6 nokogiri-1.12.5-x86_64-darwin.gem 0868c8d0a147904d4dedaaa05af5f06656f2d3c67e4432601718559bf69d6cea nokogiri-1.12.5-x86_64-linux.gem 2b20905942acc580697c8c496d0d1672ab617facb9d30d156b3c7676e67902ec nokogiri-1.12.5.gem
1.12.4
1.12.4 / 2021-08-29
Notable fix: Namespace inheritance
Namespace behavior when reparenting nodes has historically been poorly specified and the behavior diverged between CRuby and JRuby. As a result, making this behavior consistent in v1.12.0 introduced a breaking change.
This patch release reverts the Builder behavior present in v1.12.0..v1.12.3 but keeps the Document behavior. This release also introduces a Document attribute to allow affected users to easily change this behavior for their legacy code without invasive changes.
Compensating Feature in XML::Document
This release of Nokogiri introduces a new
Document
boolean attribute,namespace_inheritance
, which controls whether children should inherit a namespace when they are reparented.Nokogiri::XML:Document
defaults this attribute tofalse
meaning "do not inherit," thereby making explicit the behavior change introduced in v1.12.0.CRuby users who desire the pre-v1.12.0 behavior may set
document.namespace_inheritance = true
before reparenting nodes.See https://nokogiri.org/rdoc/Nokogiri/XML/Document.html#namespace_inheritance-instance_method for example usage.
Fix for XML::Builder
However, recognizing that we want
Builder
-created children to inherit namespaces, Builder now will setnamespace_inheritance=true
on the underlying document for both JRuby and CRuby. This means that, on CRuby, the pre-v1.12.0 behavior is restored.Users who want to turn this behavior off may pass a keyword argument to the Builder constructor like so:
Nokogiri::XML::Builder.new(namespace_inheritance: false)See https://nokogiri.org/rdoc/Nokogiri/XML/Builder.html#label-Namespace+inheritance for example usage.
Downstream gem maintainers
Note that any downstream gems may want to specifically omit Nokogiri v1.12.0--v1.12.3 from their dependency specification if they rely on child namespace inheritance:
Gem::Specification.new do |gem| # ... gem.add_runtime_dependency 'nokogiri', '!=1.12.3', '!=1.12.2', '!=1.12.1', '!=1.12.0' # ... endFixed
- [JRuby] Fix NPE in Schema parsing when an imported resource doesn't have a
systemId
. [#2296] (Thanks, @pepijnve!)
SHA256 checksums:
892808245fad3dea1bd4405461ba45d8f2261a6e23af91b8fc4b136e37cd3475 nokogiri-1.12.4-arm64-darwin.gem 1179f2c8fc13f4cb349b4e9219fbe7c1e7b885e24aceb2c8a0e06d1c3fe3ec2a nokogiri-1.12.4-java.gem 44e728900a919ca9d8c6a3f545c2ff4903f4f45c47255904548386ad9f9869d6 nokogiri-1.12.4-x64-mingw32.gem 1116dac823e27f5255024c3154f0db3d2c9008cfdcaf11bbd66bde7770dca12d nokogiri-1.12.4-x86-linux.gem 129b372c37dc817b588c623e6899ad32fe166498320789611ae3de0c361166ed nokogiri-1.12.4-x86-mingw32.gem f6f606dbdedd94e85e2fdc5e5829833441962115c3b62a2eab0a51f8ba938c3a nokogiri-1.12.4-x86_64-darwin.gem d706df7ed9382c749382e5b3bd9bfa4986935c0c5e36856d75fd9008d80f4da0 nokogiri-1.12.4-x86_64-linux.gem 7fec161ee1c7b2329e05fed019bfc7b1f910a39e6b30ae95825e75dda2094de9 nokogiri-1.12.4.gem
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ mini_portile2 (indirect, 2.6.1 → 2.8.0) · Repo · Changelog
Release Notes
2.8.0
2.8.0 / 2022-02-20
Added
- Support xz-compressed archives (recognized by an
.xz
file extension).- When downloading a source archive, default open_timeout and read_timeout to 10 seconds, but allow configuration via open_timeout and read_timeout config parameters.
2.7.1
2.7.1 / 2021-10-20
Packaging
A test artifact that has been included in the gem was being flagged by some users' security scanners because it wasn't a real tarball. That artifact has been updated to be a real tarball. [#108]
2.7.0
2.7.0 / 2021-08-31
Added
The commands used for "make", "compile", and "cmake" are configurable via keyword arguments. [#107] (Thanks, @cosmo0920!)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 19 commits:
version bump to 2.8.0
Merge pull request #114 from flavorjones/flavorjones-support-xz-files
ci: skip examples that won't build on arm64-darwin
feat: support xz-compressed archives
Merge pull request #115 from flavorjones/flavorjones-add-darwin-to-ci-matrix
feat: {open,read}_timeout defaults to 10, can be overridden
ci: add darwin coverage to the ci matrix
dev(dep): update development dependencies
Merge pull request #113 from flavorjones/flavorjones-update-ci-to-ruby31
ci: update to cover Ruby 3.1
meta: Github Sponsors link
version bump to v2.7.1
update CHANGELOG for release
Merge pull request #109 from flavorjones/108-make-it-a-real-tarball-plz
fix: ensure test artifact is a real tarball
version bump to v2.7.0
Merge pull request #107 from cosmo0920/support-replace-cmake-command-via-initialize
allow configuration of some commands
ci: do not fail fast, cancel in progress
↗️ racc (indirect, 1.5.2 → 1.6.0) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by 47 commits:
Bump up racc version to 1.6.0
Merge pull request #171 from ruby/gemspec-homepage-url
gemspec: Link to https in homepage [ci skip]
Merge pull request #169 from olleolleolle/dir-everywhere
Merge pull request #170 from ruby/ci-use-latest-jruby
CI: Use JRuby 9.2.19.0
Prefer __dir__ over File.dirname(__FILE__)
Merge pull request #168 from ruby/split-test-helper
Ignored loading CoreAssertions in test case
Rename helper to case
Bump up the latest version of CoreAssertions
Merge pull request #166 from ruby/restructure
Removed pre-setup from gemspec
Removed needless files from gemspec
Move document from library directory
Removed generate code from parser.rb. It's already migrated by rake task
Add missing check for rb_block_call()
Merge pull request #161 from brunoarueira/feat/shrink-gem-size
Shrink gem size
Merge pull request #164 from ruby/drop-ruby-2-4
Remove Object monkey patch
Removed needless condition for old versions of RubyGems.
Drop to support Ruby 2.4
Merge pull request #163 from ruby/refine-doc-dir
Followed up #162
Merge pull request #162 from ruby/doc
Import wiki file to doc
Integrate rhtml files to doc directory
Rename rdoc to doc
Merge pull request #157 from akimd/master
Merge pull request #160 from casperisfine/integer-list-literal
CI: use jruby-9.2.17.0
Stop compressing integer lists
Enclose the code that was accidentally a link in "tt"
Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFE
doc: spellos
Merge pull request #154 from olleolleolle/drop-rubyforge-mention
README: Drop RubyForge link
Merge pull request #153 from akimd/master
typo: s/grammer/grammar/g
Merge pull request #151 from olleolleolle/patch-2
CI: Refer to 3.0 as "3.0" in YAML
Added Ruby 3.0 and JRuby 9.2.16.0
Don't need to install bundler manually
Don't use checkout@master
Merge pull request #148 from enebo/remove_deprecations
Remove deprecations.
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase
.
All Depfu comment commands
- @depfu rebase
- Rebases against your default branch and redoes this update
- @depfu recreate
- Recreates this PR, overwriting any edits that you've made to it
- @depfu merge
- Merges this PR once your tests are passing and conflicts are resolved
- @depfu close
- Closes this PR and deletes the branch
- @depfu reopen
- Restores the branch and reopens this PR (if it's closed)
- @depfu pause
- Ignores all future updates for this dependency and closes this PR
- @depfu pause [minor|major]
- Ignores all future minor/major updates for this dependency and closes this PR
- @depfu resume
- Future versions of this dependency will create PRs again (leaves this PR as is)