File CVE-2020-8165.patch of Package rubygem-activesupport-5_1.16693

Index: activesupport-5.1.4/lib/active_support/cache/mem_cache_store.rb
===================================================================
--- activesupport-5.1.4.orig/lib/active_support/cache/mem_cache_store.rb
+++ activesupport-5.1.4/lib/active_support/cache/mem_cache_store.rb
@@ -27,14 +27,6 @@ module ActiveSupport
       # Provide support for raw values in the local cache strategy.
       module LocalCacheWithRaw # :nodoc:
         private
-          def read_entry(key, options)
-            entry = super
-            if options[:raw] && local_cache && entry
-              entry = deserialize_entry(entry.value)
-            end
-            entry
-          end
-
           def write_entry(key, entry, options)
             if options[:raw] && local_cache
               raw_entry = Entry.new(entry.value.to_s)
@@ -179,9 +171,8 @@ module ActiveSupport
           key
         end
 
-        def deserialize_entry(raw_value)
-          if raw_value
-            entry = Marshal.load(raw_value) rescue raw_value
+        def deserialize_entry(entry)
+          if entry
             entry.is_a?(Entry) ? entry : Entry.new(entry)
           end
         end
openSUSE Build Service is sponsored by