aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-02-24 19:00:19 -0500
committerGitHub <noreply@github.com>2017-02-24 19:00:19 -0500
commit389c61780d3e9d7717b8eae11c4981de985681b2 (patch)
treee989ba88823b4011a35ff11687c05eecd18b638d /activesupport/lib/active_support
parent87b2b6c5124732ff709b8e1900a99ba0a08f6982 (diff)
parent29c02709cd68a122c5db4f58ec0e901fe3d507cc (diff)
downloadrails-389c61780d3e9d7717b8eae11c4981de985681b2.tar.gz
rails-389c61780d3e9d7717b8eae11c4981de985681b2.tar.bz2
rails-389c61780d3e9d7717b8eae11c4981de985681b2.zip
Merge pull request #28158 from dylanahsmith/gzip-crc-check
Add missing gzip footer check in ActiveSupport::Gzip.decompress
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/gzip.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/gzip.rb b/activesupport/lib/active_support/gzip.rb
index 84eef6a623..95a86889ec 100644
--- a/activesupport/lib/active_support/gzip.rb
+++ b/activesupport/lib/active_support/gzip.rb
@@ -21,7 +21,7 @@ module ActiveSupport
# Decompresses a gzipped string.
def self.decompress(source)
- Zlib::GzipReader.new(StringIO.new(source)).read
+ Zlib::GzipReader.wrap(StringIO.new(source), &:read)
end
# Compresses a string using gzip.