Skip to content

[PIMCORE-6187] Support rubyzip 3 - #9

Open
erikkessler1 wants to merge 3 commits into
masterfrom
rubyzip-3-compat
Open

erikkessler1 wants to merge 3 commits into
masterfrom
rubyzip-3-compat

Conversation

@erikkessler1

@erikkessler1 erikkessler1 commented Nov 23, 2026 •

Copy link
Copy Markdown

This PR requires rubyzip 3.4 so that we can move away from the vulnerable rubyzip 2.

prime: @fgarces

PIMCORE-6187

erikkessler1 and others added 3 commits November 20, 2026 11:30
rubyzip 3 treats the path passed to Zip::Entry#extract as relative to a
destination directory (the current directory by default), so extracting
to roo's absolute tmpdir paths wrote under the wrong directory and every
xlsx open failed with ENOENT. Pass the tmpdir as destination_directory
instead.

Require rubyzip >= 3.4.0, which fixes the Zip::Entry#extract path
traversal in CVE-2026-85396.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Declare csv and matrix as dependencies. csv stopped being a default
  gem in Ruby 3.4 and matrix in Ruby 3.1, so requiring them fails under
  bundler without them.
- Pass the options hash explicitly in the Roo::Spreadsheet.open spec so
  the mock matches the positional hash roo passes.
- Replace File.exists?, removed in Ruby 3.2, and assert_equal nil,
  which Minitest 6 rejects, in the minitest suite.
- Exclude .simplecov from RuboCop. rubocop 1.0's Layout/BlockAlignment
  crashes on a file that is a single top-level block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only Roo::Base#to_matrix uses matrix, and it requires it lazily, so
roo loads without it. Apps that call to_matrix need matrix in their
own bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@erikkessler1
erikkessler1 requested a review from fgarces November 23, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant