Package: rails / 2:4.1.8-1+deb8u4

CVE-2015-7581.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From fb790341d0ea25ad91116c283d49a2c83a8ea299 Mon Sep 17 00:00:00 2001
From: eileencodes <eileencodes@gmail.com>
Date: Fri, 21 Aug 2015 11:26:19 -0400
Subject: [PATCH] Remove unnecessary caching

`ActiveSupport::Dependencies.constantize(const_name)` calls
`Reference.new` which is defined as
`ActiveSupport::Dependencies.constantize(const_name)` meaning this call
is already cached and we're doing caching that isn't necessary.

Conflicts:
	actionpack/lib/action_dispatch/routing/route_set.rb

Conflicts:
	actionpack/lib/action_dispatch/routing/route_set.rb

CVE-2015-7581
---
 actionpack/lib/action_dispatch/routing/route_set.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 51dd607..5f727fd 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -1,6 +1,5 @@
 require 'action_dispatch/journey'
 require 'forwardable'
-require 'thread_safe'
 require 'active_support/concern'
 require 'active_support/core_ext/object/to_query'
 require 'active_support/core_ext/hash/slice'
@@ -24,7 +23,6 @@ module ActionDispatch
         def initialize(options={})
           @defaults = options[:defaults]
           @glob_param = options.delete(:glob)
-          @controller_class_names = ThreadSafe::Cache.new
         end
 
         def call(env)
@@ -74,7 +72,7 @@ module ActionDispatch
       private
 
         def controller_reference(controller_param)
-          const_name = @controller_class_names[controller_param] ||= "#{controller_param.camelize}Controller"
+          const_name = "#{controller_param.camelize}Controller"
           ActiveSupport::Dependencies.constantize(const_name)
         end
 
-- 
2.2.1