Skip to content

Commit

Permalink
Update rubyzip to 1.3.0 to fix vulnerability (forem#4133)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhymes authored and Aswathprabhu committed Sep 30, 2019
1 parent a4ac194 commit 56c5f08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -76,7 +76,7 @@ gem "redcarpet", "~> 3.5" # A fast, safe and extensible Markdown to (X)HTML pars
gem "reverse_markdown", "~> 1.3" # Map simple html back into markdown
gem "rolify", "~> 5.2" # Very simple Roles library
gem "rouge", "~> 3.10" # A pure-ruby code highlighter
gem "rubyzip", "~> 1.2" # Rubyzip is a ruby library for reading and writing zip files
gem "rubyzip", "~> 1.2", ">= 1.3.0" # Rubyzip is a ruby library for reading and writing zip files
gem "s3_direct_upload", "~> 0.1" # Direct Upload to Amazon S3
gem "sail", "~> 1.5" # Sail is a lightweight Rails engine that brings an admin panel for managing configuration settings on a live Rails app
gem "sass-rails", "~> 5.1" # Sass adapter for the Rails asset pipeline
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -670,7 +670,7 @@ GEM
ruby-vips (2.0.15)
ffi (~> 1.9)
ruby_dep (1.5.0)
rubyzip (1.2.4)
rubyzip (1.3.0)
s3_direct_upload (0.1.7)
coffee-rails (>= 3.1)
jquery-fileupload-rails (~> 0.4.1)
Expand Down Expand Up @@ -956,7 +956,7 @@ DEPENDENCIES
rubocop-rails (~> 2.3)
rubocop-rspec (~> 1.35)
ruby-prof (~> 1.0)
rubyzip (~> 1.2)
rubyzip (~> 1.2, >= 1.3.0)
s3_direct_upload (~> 0.1)
sail (~> 1.5)
sass-rails (~> 5.1)
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/rubyzip.rb
@@ -0,0 +1,5 @@
# Validate entry size on extract
# NOTE: this initializer can be removed when upgrading to rubyzip >= 2.0
# see https://github.com/rubyzip/rubyzip/pull/403
# see https://github.com/rubyzip/rubyzip#size-validation
Zip.validate_entry_sizes = true

0 comments on commit 56c5f08

Please sign in to comment.