Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 [security] Update rubocop: 0.81.0 → 1.11.0 (major) #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Mar 2, 2021


🚨 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?

✳️ rubocop (0.81.0 → 1.11.0) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

✳️ capybara (3.33.0 → 3.35.3) · Repo · Changelog

Release Notes

3.35.3 (from changelog)

Release date: 2021-01-29

Fixed

  • Just a release to have the correct dates in the History.md in released gem

3.35.2 (from changelog)

Release date: 2021-01-29

Fixed

  • Selenium deprecation suppressor with Selenium 3.x

3.35.1 (from changelog)

Release date: 2021-01-26

Fixed

  • Default chrome driver registrations use chrome - Issue #2442 [Yuriy Alekseyev]
  • 'Capybara.test_id' usage with the :button selector - Issue #2443

3.35.0 (from changelog)

Release date: 2020-01-25

Added

  • Support Regexp matching for individual class names in :class filter passed an Array
  • Animation disabler now supports JQuery animation disabling when JQuery loaded from body [Chien-Wei Huang]

Fixed

  • :button selector type use with enable_aria_role [Sean Doyle]
  • elements don't associate with aria-role buttons
  • Ignore Selenium::WebDriver::Error::InvalidSessionIdError when quitting driver [Robin Daugherty]
  • Firefox: Don't click input when sending keys if already focused
  • Miscellaneous issues with selenium-webdriver 4.0.0.alphas
  • Nil return error in node details optimizations
  • Animation disabler now inserts XHTML compliant content [Dale Morgan]

3.34.0 (from changelog)

Release date: 2020-11-26

Added

  • Ability to fill in with emoji when using Chrome with selenium driver (Firefox already worked)
  • Current path assetsions/expectations accept optional filter block
  • Animation disabler now specifies scroll-behavior: auto; [Nathan Broadbent]
  • :button selector can now find elements by label text [Sean Doyle]
  • Session#send_keys to send keys to the current element with focus in drivers that support the concept of a current element [Sean Doyle]

Changed

  • Text query validates the type parameter to prevent undefined behavior

Fixed

  • racktest driver better handles fragments and redirection to urls that include fragments
  • Don't error when attempting to get XPath location of a shadow element
  • Missing readonly? added to Node::Simple
  • Selenium version detection when loaded via alternate method [Joel Hawksley]
  • Connection count issue if REQUEST_URI value changed by app [Blake Williams]
  • Maintain URI fragment when redirecting in rack-test driver
  • Text query error message [Wojciech WnÄ™trzak]
  • Checking a checkbox/radio button with allow_label_click now works if there are multiple labels (Issue #2421)
  • drop with Pathname (Issue #2424)[Máximo Mussini]

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.

↗️ ast (indirect, 2.4.0 → 2.4.2) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 12 commits:

↗️ mini_portile2 (indirect, 2.4.0 → 2.5.0) · Repo · Changelog

Release Notes

2.5.0

2.5.0 / 2020-02-24

Enhancements

  • When verifying GPG signatures, remove all imported pubkeys from keyring [#90] (Thanks, @hanazuki!)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 10 commits:

↗️ nokogiri (indirect, 1.10.10 → 1.11.1) · Repo · Changelog

Security Advisories 🚨

🚨 Nokogiri::XML::Schema trusts input by default, exposing risk of an XXE vulnerability

Description

In Nokogiri versions <= 1.11.0.rc3, XML Schemas parsed by Nokogiri::XML::Schema
are trusted by default, allowing external resources to be accessed over the
network, potentially enabling XXE or SSRF attacks.

This behavior is counter to
the security policy followed by Nokogiri maintainers, which is to treat all input
as untrusted by default whenever possible.

Please note that this security
fix was pushed into a new minor version, 1.11.x, rather than a patch release to
the 1.10.x branch, because it is a breaking change for some schemas and the risk
was assessed to be "Low Severity".

Affected Versions

Nokogiri <= 1.10.10 as well as prereleases 1.11.0.rc1, 1.11.0.rc2, and 1.11.0.rc3

Mitigation

There are no known workarounds for affected versions. Upgrade to Nokogiri
1.11.0.rc4 or later.

If, after upgrading to 1.11.0.rc4 or later, you wish
to re-enable network access for resolution of external resources (i.e., return to
the previous behavior):

  1. Ensure the input is trusted. Do not enable this option
    for untrusted input.
  2. When invoking the Nokogiri::XML::Schema constructor,
    pass as the second parameter an instance of Nokogiri::XML::ParseOptions with the
    NONET flag turned off.

So if your previous code was:

# in v1.11.0.rc3 and earlier, this call allows resources to be accessed over the network
# but in v1.11.0.rc4 and later, this call will disallow network access for external resources
schema = Nokogiri::XML::Schema.new(schema)

# in v1.11.0.rc4 and later, the following is equivalent to the code above
# (the second parameter is optional, and this demonstrates its default value)
schema = Nokogiri::XML::Schema.new(schema, Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA)

Then you can add the second parameter to indicate that the input is trusted by changing it to:

# in v1.11.0.rc3 and earlier, this would raise an ArgumentError
# but in v1.11.0.rc4 and later, this allows resources to be accessed over the network
schema = Nokogiri::XML::Schema.new(trusted_schema, Nokogiri::XML::ParseOptions.new.nononet)
Release Notes

1.11.1

v1.11.1 / 2021-01-06

Fixed

  • [CRuby] If libxml-ruby is loaded before nokogiri, the SAX and Push parsers no longer call libxml-ruby's handlers. Instead, they defensively override the libxml2 global handler before parsing. [#2168]

SHA-256 Checksums of published gems

a41091292992cb99be1b53927e1de4abe5912742ded956b0ba3383ce4f29711c  nokogiri-1.11.1-arm64-darwin.gem
d44fccb8475394eb71f29dfa7bb3ac32ee50795972c4557ffe54122ce486479d  nokogiri-1.11.1-java.gem
f760285e3db732ee0d6e06370f89407f656d5181a55329271760e82658b4c3fc  nokogiri-1.11.1-x64-mingw32.gem
dd48343bc4628936d371ba7256c4f74513b6fa642e553ad7401ce0d9b8d26e1f  nokogiri-1.11.1-x86-linux.gem
7f49138821d714fe2c5d040dda4af24199ae207960bf6aad4a61483f896bb046  nokogiri-1.11.1-x86-mingw32.gem
5c26111f7f26831508cc5234e273afd93f43fbbfd0dcae5394490038b88d28e7  nokogiri-1.11.1-x86_64-darwin.gem
c3617c0680af1dd9fda5c0fd7d72a0da68b422c0c0b4cebcd7c45ff5082ea6d2  nokogiri-1.11.1-x86_64-linux.gem
42c2a54dd3ef03ef2543177bee3b5308313214e99f0d1aa85f984324329e5caa  nokogiri-1.11.1.gem

1.11.0

v1.11.0 / 2021-01-03

Notes

Faster, more reliable installation: Native Gems for Linux and OSX/Darwin

"Native gems" contain pre-compiled libraries for a specific machine architecture. On supported platforms, this removes the need for compiling the C extension and the packaged libraries. This results in much faster installation and more reliable installation, which as you probably know are the biggest headaches for Nokogiri users.

We've been shipping native Windows gems since 2009, but starting in v1.11.0 we are also shipping native gems for these platforms:

  • Linux: x86-linux and x86_64-linux -- including musl platforms like alpine
  • OSX/Darwin: x86_64-darwin and arm64-darwin

We'd appreciate your thoughts and feedback on this work at #2075.

Dependencies

Ruby

This release introduces support for Ruby 2.7 and 3.0 in the precompiled native gems.

This release ends support for:

Gems

  • Explicitly add racc as a runtime dependency. [#1988] (Thanks, @voxik!)
  • [MRI] Upgrade mini_portile2 dependency from ~> 2.4.0 to ~> 2.5.0 [#2005] (Thanks, @alejandroperea!)

Security

See note below about CVE-2020-26247 in the "Changed" subsection entitled "XML::Schema parsing treats input as untrusted by default".

Added

  • Add Node methods for manipulating "keyword attributes" (for example, class and rel): #kwattr_values, #kwattr_add, #kwattr_append, and #kwattr_remove. [#2000]
  • Add support for CSS queries a:has(> b), a:has(~ b), and a:has(+ b). [#688] (Thanks, @jonathanhefner!)
  • Add Node#value? to better match expected semantics of a Hash-like object. [#1838, #1840] (Thanks, @MatzFan!)
  • [CRuby] Add Nokogiri::XML::Node#line= for use by downstream libs like nokogumbo. [#1918] (Thanks, @stevecheckoway!)
  • nokogiri.gemspec is back after a 10-year hiatus. We still prefer you use the official releases, but master is pretty stable these days, and YOLO.

Performance

  • [CRuby] The CSS ~= operator and class selector . are about 2x faster. [#2137, #2135]
  • [CRuby] Patch libxml2 to call strlen from xmlStrlen rather than the naive implementation, because strlen is generally optimized for the architecture. [#2144] (Thanks, @ilyazub!)
  • Improve performance of some namespace operations. [#1916] (Thanks, @ashmaroli!)
  • Remove unnecessary array allocations from Node serialization methods [#1911] (Thanks, @ashmaroli!)
  • Avoid creation of unnecessary zero-length String objects. [#1970] (Thanks, @ashmaroli!)
  • Always compile libxml2 and libxslt with '-O2' [#2022, #2100] (Thanks, @ilyazub!)
  • [JRuby] Lots of code cleanup and performance improvements. [#1934] (Thanks, @kares!)
  • [CRuby] RelaxNG.from_document no longer leaks memory. [#2114]

Improved

  • [CRuby] Handle incorrectly-closed HTML comments as WHATWG recommends for browsers. [#2058] (Thanks to HackerOne user mayflower for reporting this!)
  • {HTML,XML}::Document#parse now accept Pathname objects. Previously this worked only if the referenced file was less than 4096 bytes long; longer files resulted in undefined behavior because the read method would be repeatedly invoked. [#1821, #2110] (Thanks, @doriantaylor and @phokz!)
  • [CRuby] Nokogumbo builds faster because it can now use header files provided by Nokogiri. [#1788] (Thanks, @stevecheckoway!)
  • Add frozen_string_literal: true magic comment to all lib files. [#1745] (Thanks, @oniofchaos!)
  • [JRuby] Clean up deprecated calls into JRuby. [#2027] (Thanks, @headius!)

Fixed

  • HTML Parsing in "strict" mode (i.e., the RECOVER parse option not set) now correctly raises a XML::SyntaxError exception. Previously the value of the RECOVER bit was being ignored by CRuby and was misinterpreted by JRuby. [#2130]
  • The CSS ~= operator now correctly handles non-space whitespace in the class attribute. commit e45dedd
  • The switch to turn off the CSS-to-XPath cache is now thread-local, rather than being shared mutable state. [#1935]
  • The Node methods add_previous_sibling, previous=, before, add_next_sibling, next=, after, replace, and swap now correctly use their parent as the context node for parsing markup. These methods now also raise a RuntimeError if they are called on a node with no parent. [nokogumbo#160]
  • [JRuby] XML::Schema XSD validation errors are captured in XML::Schema#errors. These errors were previously ignored.
  • [JRuby] Standardize reading from IO like objects, including StringIO. [#1888, #1897]
  • [JRuby] Fix how custom XPath function namespaces are inferred to be less naive. [#1890, #2148]
  • [JRuby] Clarify exception message when custom XPath functions can't be resolved.
  • [JRuby] Comparison of Node to Document with Node#<=> now matches CRuby/libxml2 behavior.
  • [CRuby] Syntax errors are now correctly captured in Document#errors for short HTML documents. Previously the SAX parser used for encoding detection was clobbering libxml2's global error handler.
  • [CRuby] Fixed installation on AIX with respect to vasprintf. [#1908]
  • [CRuby] On some platforms, avoid symbol name collision with glibc's canonicalize. [#2105]
  • [Windows Visual C++] Fixed compiler warnings and errors. [#2061, #2068]
  • [CRuby] Fixed Nokogumbo integration which broke in the v1.11.0 release candidates. [#1788] (Thanks, @stevecheckoway!)
  • [JRuby] Fixed document encoding regression in v1.11.0 release candidates. [#2080, #2083] (Thanks, @thbar!)

Removed

  • The internal method Nokogiri::CSS::Parser.cache_on= has been removed. Use .set_cache if you need to muck with the cache internals.
  • The class method Nokogiri::CSS::Parser.parse has been removed. This was originally deprecated in 2009 in 13db61b. Use Nokogiri::CSS.parse instead.

Changed

XML::Schema input is now "untrusted" by default

Address CVE-2020-26247.

In Nokogiri versions <= 1.11.0.rc3, XML Schemas parsed by Nokogiri::XML::Schema were trusted by default, allowing external resources to be accessed over the network, potentially enabling XXE or SSRF attacks.

This behavior is counter to the security policy intended by Nokogiri maintainers, which is to treat all input as untrusted by default whenever possible.

Please note that this security fix was pushed into a new minor version, 1.11.x, rather than a patch release to the 1.10.x branch, because it is a breaking change for some schemas and the risk was assessed to be "Low Severity".

More information and instructions for enabling "trusted input" behavior in v1.11.0.rc4 and later is available at the public advisory.

HTML parser now obeys the strict or norecover parsing option

(Also noted above in the "Fixed" section) HTML Parsing in "strict" mode (i.e., the RECOVER parse option not set) now correctly raises a XML::SyntaxError exception. Previously the value of the RECOVER bit was being ignored by CRuby and was misinterpreted by JRuby.

If you're using the default parser options, you will be unaffected by this fix. If you're passing strict or norecover to your HTML parser call, you may be surprised to see that the parser now fails to recover and raises a XML::SyntaxError exception. Given the number of HTML documents on the internet that libxml2 would consider to be ill-formed, this is probably not what you want, and you can omit setting that parse option to restore the behavior that you have been relying upon.

Apologies to anyone inconvenienced by this breaking bugfix being present in a minor release, but I felt it was appropriate to introduce this fix because it's straightforward to fix any code that has been relying on this buggy behavior.

VersionInfo, the output of nokogiri -v, and related constants

This release changes the metadata provided in Nokogiri::VersionInfo which also affects the output of nokogiri -v. Some related constants have also been changed. If you're using VersionInfo programmatically, or relying on constants related to underlying library versions, please read the detailed changes for Nokogiri::VersionInfo at #2139 and accept our apologies for the inconvenience.

SHA-256 Checksums of published gems

17ed2567bf76319075b4a6a7258d1a4c9e2661fca933b03e037d79ae2b9910d0  nokogiri-1.11.0.gem
2f0149c735b0672c49171b18467ce25fd323a8e608c9e6b76e2b2fa28e7f66ee  nokogiri-1.11.0-java.gem
2f249be8cc705f9e899c07225fcbe18f4f7dea220a59eb5fa82461979991082e  nokogiri-1.11.0-x64-mingw32.gem
9e219401dc3f93abf09166d12ed99c8310fcaf8c56a99d64ff93d8b5f0604e91  nokogiri-1.11.0-x86-mingw32.gem
bda2a9c9debf51da7011830c7f2dc5771c122ebcf0fc2dd2c4ba4fc95b5c38f2  nokogiri-1.11.0-x86-linux.gem
d500c3202e2514b32f4b02049d9193aa825ae3e9442c9cad2d235446c3e17d8d  nokogiri-1.11.0-x86_64-linux.gem
3a613188e3b76d593b04e0ddcc46f44c288b13f80b32ce83957356f50e22f9ee  nokogiri-1.11.0-arm64-darwin.gem
b8f9b826d09494b20b30ecd048f5eb2827dccd85b77abeb8baf1f610e5ed28ed  nokogiri-1.11.0-x86_64-darwin.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.

↗️ parallel (indirect, 1.19.1 → 1.20.1) · Repo

Commits

See the full diff on Github. The new version differs by 22 commits:

↗️ parser (indirect, 2.7.0.5 → 3.0.0.0) · Repo · Changelog

Release Notes

3.0.0.0 (from changelog)

API modifications:

  • current.rb: bump default branch to parser/ruby30. (#782) (Ilya Bylich)
  • do not emit truncated parts of squiggly heredoc (#774) (Ilya Bylich)
  • Optimize SourceBuffer line and column handling (#755) (Marc-AndrĂ© Lafortune)

Features implemented:

  • ruby30.y: reintroduce expr in pat (#777) (Ilya Bylich)
  • builder: emit implicit hash passed to a method call as kwargs (#769) (Ilya Bylich)
  • lexer.rl: use more specific warning for ambiguous slash. (#768) (Ilya Bylich)
  • ruby30.y: allow endless method without arglist. (#765) (Ilya Bylich)
  • ruby30.y: use => for one-line pattern matching. (#760) (Ilya Bylich)
  • ruby30.y: reject setters in all endless method defs. (#758) (Ilya Bylich)

Bugs fixed:

  • lexer.rl: don't perform lookahead after tASSOC. (#764) (Ilya Bylich)

2.7.2.0 (from changelog)

API modifications:

  • Bump 2.7 branch to 2.7.2 (#748) (Koichi ITO)

2.7.1.5 (from changelog)

API modifications:

  • right assignment: use existing AST node types (#738) (#739) (Marc-AndrĂ© Lafortune)
  • ruby28.y -> ruby30.y (#729) (Vladimir Dementyev)

Features implemented:

  • Optimize Range#column_range (#741) (Marc-AndrĂ© Lafortune)
  • ruby30.y: reject endless setter. (#736) (Ilya Bylich)
  • ruby28.y: reject assignment to numparam. (#725) (Ilya Bylich)
  • emit "endless method def" as :def node. (#716) (Ilya Bylich)

Bugs fixed:

  • rename 2.8 to 3.0 everywhere (#732) (Ilya Bylich)
  • test_current.rb: 2.8 -> 3.0 (#731) (Vladimir Dementyev)
  • Parser#parse returns nil instead of false if error is thrown (#722) (Marc-AndrĂ© Lafortune)
  • unify locations for normal and endless method definition (#718) (Marc-AndrĂ© Lafortune)
  • ruby27.y: accept const names as hash keys for pattern matching (#717) (Koichi ITO)
  • Fix locations for alias / undef nodes with internal symbols (#715) (Marc-AndrĂ© Lafortune)

2.7.1.4 (from changelog)

Features implemented:

  • ruby28.y: add find pattern. (#714) (Ilya Bylich)
  • lexer.rl: reject ->... and ->(...) with the same error. (#713) (Ilya Bylich)
  • ruby28.y: accept leading args before forward arg. (#712) (Ilya Bylich)
  • Added emit_forward_arg compatibility flag. (#710) (Ilya Bylich)
  • ruby28.y: include entire lambda expr in lambda rule. (#708) (Ilya Bylich)
  • ruby28.y: extracted excessed_comma rule. (#706) (Ilya Bylich)
  • Source::TreeRewriter: Improved merging and representations (#703) (Marc-AndrĂ© Lafortune)

Bugs fixed:

  • ruby*.y: fixed context inside lambda args and module. (#709) (Ilya Bylich)

2.7.1.3 (from changelog)

API modifications:

  • fixed all warnings. tests are running in verbose mode now. (#685) (Ilya Bylich)

Features implemented:

  • ruby-[parse, rewrite]: add legacy switches (#699) (Marc-AndrĂ© Lafortune)
  • Added Parser::Source::Range#to_range. (#697) (Ilya Bylich)
  • ruby28.y: support rescue modifier in endless method definition. (#696) (Ilya Bylich)
  • ruby28.y: unify kwrest and no-kwrest rules. (#694) (Ilya Bylich)
  • ruby28.y: add right hand assignment (#682) (Vladimir Dementyev)

Bugs fixed:

  • fix Comment.associate for postfix conditions/loops (#688) (Marc-AndrĂ© Lafortune)

2.7.1.0 (from changelog)

API modifications:

  • Bump ruby versions to 2.4.10, 2.5.8, 2.6.6, 2.7.1. (#665) (Ilya Bylich)

Features implemented:

  • ruby27.y: allow newlines inside braced pattern. (#664) (Ilya Bylich)
  • ruby27.y: Allow trailing comma in hash pattern (#661) (Koichi ITO)

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.

↗️ public_suffix (indirect, 4.0.5 → 4.0.6) · Repo · Changelog

Release Notes

4.0.6 (from changelog)

Changed

  • Updated definitions.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 6 commits:

↗️ regexp_parser (indirect, 1.7.1 → 2.1.1) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 61 commits:

↗️ ruby-progressbar (indirect, 1.10.1 → 1.11.0) · Repo · Changelog

Release Notes

1.11.0 (from changelog)

Add

  • RUBY_PROGRESS_BAR_FORMAT Environment Variable

Merge

  • PR #165 - Show Unknown Time Remaining After Timer Reset

Fix

  • Show Unknown Time Remaining After Bar Is Reset

Uncategorized

  • Merge PR #167 - Convert To Github Actions

Does any of this look wrong? Please let us know.

↗️ unicode-display_width (indirect, 1.7.0 → 2.0.0) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🆕 racc (added, 1.5.2)

🆕 rubocop-ast (added, 1.4.1)

🗑️ jaro_winkler (removed)


Depfu Status

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants