Extract GitLab Pages using RubyZip
RubyZip allows us to perform strong validation of expanded paths where we do extract file. We introduce the following additional checks to extract routines: 1. None of path components can be symlinked, 2. We drop privileges support for directories, 3. Symlink source needs to point within the target directory, like `public/`, 4. The symlink source needs to exist ahead of time.
Showing
... | @@ -57,6 +57,7 @@ gem 'u2f', '~> 0.2.1' | ... | @@ -57,6 +57,7 @@ gem 'u2f', '~> 0.2.1' |
# GitLab Pages | # GitLab Pages | ||
gem 'validates_hostname', '~> 1.0.6' | gem 'validates_hostname', '~> 1.0.6' | ||
gem 'rubyzip', '~> 1.2.2', require: false | |||
# Browser detection | # Browser detection | ||
gem 'browser', '~> 2.5' | gem 'browser', '~> 2.5' | ||
... | ... |
lib/safe_zip/entry.rb
0 → 100644
lib/safe_zip/extract.rb
0 → 100644
File added
File added
File added
File added
File added
File added
Please register or sign in to comment