Skip to content

Commit

Permalink
Require rubyzip version 1.3.0 or higher (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhymes authored and kapoorlakshya committed Oct 7, 2019
1 parent 1af4557 commit c9cfef0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/webdrivers/common.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'rubygems/package'
require 'zip'
require 'webdrivers/logger'
require 'webdrivers/network'
require 'webdrivers/system'
Expand Down
6 changes: 6 additions & 0 deletions lib/webdrivers/system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
require 'zip'
require 'English'

# validate zip entry sizes to avoid zip bombs
# see https://github.com/rubyzip/rubyzip#size-validation
# and https://github.com/rubyzip/rubyzip/pull/403 for further details
# this will be the default in rubyzip 2.0+
Zip.validate_entry_sizes = true

module Webdrivers
#
# @api private
Expand Down
2 changes: 1 addition & 1 deletion webdrivers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'simplecov', '~>0.16'

s.add_runtime_dependency 'nokogiri', '~> 1.6'
s.add_runtime_dependency 'rubyzip', '~> 1.0'
s.add_runtime_dependency 'rubyzip', '>= 1.3.0'
s.add_runtime_dependency 'selenium-webdriver', '>= 3.0', '< 4.0'
end

0 comments on commit c9cfef0

Please sign in to comment.