actionpack 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- data/CHANGELOG.md +13 -0
- data/lib/abstract_controller/base.rb +25 -3
- data/lib/action_pack/gem_version.rb +1 -1
- metadata +40 -28
- checksums.yaml +0 -7
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## Rails 4.1.1 (May 6, 2014) ##
|
2
|
+
|
3
|
+
* Only accept actions without File::SEPARATOR in the name.
|
4
|
+
|
5
|
+
This will avoid directory traversal in implicit render.
|
6
|
+
|
7
|
+
Fixes: CVE-2014-0130
|
8
|
+
|
9
|
+
*Rafael Mendonça França*
|
10
|
+
|
11
|
+
|
12
|
+
## Rails 4.1.0 (April 8, 2014) ##
|
13
|
+
|
1
14
|
* Swapped the parameters of assert_equal in `assert_select` so that the
|
2
15
|
proper values were printed correctly
|
3
16
|
|
@@ -127,7 +127,7 @@ module AbstractController
|
|
127
127
|
def process(action, *args)
|
128
128
|
@_action_name = action_name = action.to_s
|
129
129
|
|
130
|
-
unless action_name =
|
130
|
+
unless action_name = _find_action_name(action_name)
|
131
131
|
raise ActionNotFound, "The action '#{action}' could not be found for #{self.class.name}"
|
132
132
|
end
|
133
133
|
|
@@ -160,7 +160,7 @@ module AbstractController
|
|
160
160
|
# ==== Returns
|
161
161
|
# * <tt>TrueClass</tt>, <tt>FalseClass</tt>
|
162
162
|
def available_action?(action_name)
|
163
|
-
|
163
|
+
_find_action_name(action_name).present?
|
164
164
|
end
|
165
165
|
|
166
166
|
private
|
@@ -203,6 +203,23 @@ module AbstractController
|
|
203
203
|
action_missing(@_action_name, *args)
|
204
204
|
end
|
205
205
|
|
206
|
+
# Takes an action name and returns the name of the method that will
|
207
|
+
# handle the action.
|
208
|
+
#
|
209
|
+
# It checks if the action name is valid and returns false otherwise.
|
210
|
+
#
|
211
|
+
# See method_for_action for more information.
|
212
|
+
#
|
213
|
+
# ==== Parameters
|
214
|
+
# * <tt>action_name</tt> - An action name to find a method name for
|
215
|
+
#
|
216
|
+
# ==== Returns
|
217
|
+
# * <tt>string</tt> - The name of the method that handles the action
|
218
|
+
# * false - No valid method name could be found. Raise ActionNotFound.
|
219
|
+
def _find_action_name(action_name)
|
220
|
+
_valid_action_name?(action_name) && method_for_action(action_name)
|
221
|
+
end
|
222
|
+
|
206
223
|
# Takes an action name and returns the name of the method that will
|
207
224
|
# handle the action. In normal cases, this method returns the same
|
208
225
|
# name as it receives. By default, if #method_for_action receives
|
@@ -225,7 +242,7 @@ module AbstractController
|
|
225
242
|
#
|
226
243
|
# ==== Returns
|
227
244
|
# * <tt>string</tt> - The name of the method that handles the action
|
228
|
-
# * <tt>nil</tt> - No method name could be found.
|
245
|
+
# * <tt>nil</tt> - No method name could be found.
|
229
246
|
def method_for_action(action_name)
|
230
247
|
if action_method?(action_name)
|
231
248
|
action_name
|
@@ -233,5 +250,10 @@ module AbstractController
|
|
233
250
|
"_handle_action_missing"
|
234
251
|
end
|
235
252
|
end
|
253
|
+
|
254
|
+
# Checks if the action name is valid and returns false otherwise.
|
255
|
+
def _valid_action_name?(action_name)
|
256
|
+
action_name.to_s !~ Regexp.new(File::SEPARATOR)
|
257
|
+
end
|
236
258
|
end
|
237
259
|
end
|
metadata
CHANGED
@@ -1,85 +1,96 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- David Heinemeier Hansson
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: activesupport
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - '='
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.
|
21
|
+
version: 4.1.1
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - '='
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.
|
29
|
+
version: 4.1.1
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rack
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: 1.5.2
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: 1.5.2
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rack-test
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: 0.6.2
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: 0.6.2
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: actionview
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - '='
|
60
68
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.1.
|
69
|
+
version: 4.1.1
|
62
70
|
type: :runtime
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - '='
|
67
76
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.1.
|
77
|
+
version: 4.1.1
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: activemodel
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - '='
|
74
84
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.1.
|
85
|
+
version: 4.1.1
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - '='
|
81
92
|
- !ruby/object:Gem::Version
|
82
|
-
version: 4.1.
|
93
|
+
version: 4.1.1
|
83
94
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
84
95
|
testing MVC web applications. Works with any Rack-compatible server.
|
85
96
|
email: david@loudthinking.com
|
@@ -88,9 +99,8 @@ extensions: []
|
|
88
99
|
extra_rdoc_files: []
|
89
100
|
files:
|
90
101
|
- CHANGELOG.md
|
91
|
-
- MIT-LICENSE
|
92
102
|
- README.rdoc
|
93
|
-
-
|
103
|
+
- MIT-LICENSE
|
94
104
|
- lib/abstract_controller/asset_paths.rb
|
95
105
|
- lib/abstract_controller/base.rb
|
96
106
|
- lib/abstract_controller/callbacks.rb
|
@@ -101,12 +111,11 @@ files:
|
|
101
111
|
- lib/abstract_controller/rendering.rb
|
102
112
|
- lib/abstract_controller/translation.rb
|
103
113
|
- lib/abstract_controller/url_for.rb
|
104
|
-
- lib/
|
114
|
+
- lib/abstract_controller.rb
|
105
115
|
- lib/action_controller/base.rb
|
106
|
-
- lib/action_controller/caching.rb
|
107
116
|
- lib/action_controller/caching/fragments.rb
|
117
|
+
- lib/action_controller/caching.rb
|
108
118
|
- lib/action_controller/log_subscriber.rb
|
109
|
-
- lib/action_controller/metal.rb
|
110
119
|
- lib/action_controller/metal/conditional_get.rb
|
111
120
|
- lib/action_controller/metal/cookies.rb
|
112
121
|
- lib/action_controller/metal/data_streaming.rb
|
@@ -133,12 +142,13 @@ files:
|
|
133
142
|
- lib/action_controller/metal/strong_parameters.rb
|
134
143
|
- lib/action_controller/metal/testing.rb
|
135
144
|
- lib/action_controller/metal/url_for.rb
|
145
|
+
- lib/action_controller/metal.rb
|
136
146
|
- lib/action_controller/middleware.rb
|
137
147
|
- lib/action_controller/model_naming.rb
|
138
148
|
- lib/action_controller/railtie.rb
|
139
149
|
- lib/action_controller/railties/helpers.rb
|
140
150
|
- lib/action_controller/test_case.rb
|
141
|
-
- lib/
|
151
|
+
- lib/action_controller.rb
|
142
152
|
- lib/action_dispatch/http/cache.rb
|
143
153
|
- lib/action_dispatch/http/filter_parameters.rb
|
144
154
|
- lib/action_dispatch/http/filter_redirect.rb
|
@@ -153,7 +163,6 @@ files:
|
|
153
163
|
- lib/action_dispatch/http/response.rb
|
154
164
|
- lib/action_dispatch/http/upload.rb
|
155
165
|
- lib/action_dispatch/http/url.rb
|
156
|
-
- lib/action_dispatch/journey.rb
|
157
166
|
- lib/action_dispatch/journey/backwards.rb
|
158
167
|
- lib/action_dispatch/journey/formatter.rb
|
159
168
|
- lib/action_dispatch/journey/gtg/builder.rb
|
@@ -169,15 +178,16 @@ files:
|
|
169
178
|
- lib/action_dispatch/journey/parser_extras.rb
|
170
179
|
- lib/action_dispatch/journey/path/pattern.rb
|
171
180
|
- lib/action_dispatch/journey/route.rb
|
172
|
-
- lib/action_dispatch/journey/router.rb
|
173
181
|
- lib/action_dispatch/journey/router/strexp.rb
|
174
182
|
- lib/action_dispatch/journey/router/utils.rb
|
183
|
+
- lib/action_dispatch/journey/router.rb
|
175
184
|
- lib/action_dispatch/journey/routes.rb
|
176
185
|
- lib/action_dispatch/journey/scanner.rb
|
177
186
|
- lib/action_dispatch/journey/visitors.rb
|
178
187
|
- lib/action_dispatch/journey/visualizer/fsm.css
|
179
188
|
- lib/action_dispatch/journey/visualizer/fsm.js
|
180
189
|
- lib/action_dispatch/journey/visualizer/index.html.erb
|
190
|
+
- lib/action_dispatch/journey.rb
|
181
191
|
- lib/action_dispatch/middleware/callbacks.rb
|
182
192
|
- lib/action_dispatch/middleware/cookies.rb
|
183
193
|
- lib/action_dispatch/middleware/debug_exceptions.rb
|
@@ -216,7 +226,6 @@ files:
|
|
216
226
|
- lib/action_dispatch/railtie.rb
|
217
227
|
- lib/action_dispatch/request/session.rb
|
218
228
|
- lib/action_dispatch/request/utils.rb
|
219
|
-
- lib/action_dispatch/routing.rb
|
220
229
|
- lib/action_dispatch/routing/inspector.rb
|
221
230
|
- lib/action_dispatch/routing/mapper.rb
|
222
231
|
- lib/action_dispatch/routing/polymorphic_routes.rb
|
@@ -224,42 +233,45 @@ files:
|
|
224
233
|
- lib/action_dispatch/routing/route_set.rb
|
225
234
|
- lib/action_dispatch/routing/routes_proxy.rb
|
226
235
|
- lib/action_dispatch/routing/url_for.rb
|
227
|
-
- lib/action_dispatch/
|
236
|
+
- lib/action_dispatch/routing.rb
|
228
237
|
- lib/action_dispatch/testing/assertions/dom.rb
|
229
238
|
- lib/action_dispatch/testing/assertions/response.rb
|
230
239
|
- lib/action_dispatch/testing/assertions/routing.rb
|
231
240
|
- lib/action_dispatch/testing/assertions/selector.rb
|
232
241
|
- lib/action_dispatch/testing/assertions/tag.rb
|
242
|
+
- lib/action_dispatch/testing/assertions.rb
|
233
243
|
- lib/action_dispatch/testing/integration.rb
|
234
244
|
- lib/action_dispatch/testing/test_process.rb
|
235
245
|
- lib/action_dispatch/testing/test_request.rb
|
236
246
|
- lib/action_dispatch/testing/test_response.rb
|
237
|
-
- lib/
|
247
|
+
- lib/action_dispatch.rb
|
238
248
|
- lib/action_pack/gem_version.rb
|
239
249
|
- lib/action_pack/version.rb
|
250
|
+
- lib/action_pack.rb
|
240
251
|
homepage: http://www.rubyonrails.org
|
241
252
|
licenses:
|
242
253
|
- MIT
|
243
|
-
metadata: {}
|
244
254
|
post_install_message:
|
245
255
|
rdoc_options: []
|
246
256
|
require_paths:
|
247
257
|
- lib
|
248
258
|
required_ruby_version: !ruby/object:Gem::Requirement
|
259
|
+
none: false
|
249
260
|
requirements:
|
250
|
-
- -
|
261
|
+
- - ! '>='
|
251
262
|
- !ruby/object:Gem::Version
|
252
263
|
version: 1.9.3
|
253
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
|
+
none: false
|
254
266
|
requirements:
|
255
|
-
- -
|
267
|
+
- - ! '>='
|
256
268
|
- !ruby/object:Gem::Version
|
257
269
|
version: '0'
|
258
270
|
requirements:
|
259
271
|
- none
|
260
272
|
rubyforge_project:
|
261
|
-
rubygems_version:
|
273
|
+
rubygems_version: 1.8.23.2
|
262
274
|
signing_key:
|
263
|
-
specification_version:
|
275
|
+
specification_version: 3
|
264
276
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|
265
277
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 6aca4db694cd6ab760d544c05c9c449ef0701bfd
|
4
|
-
data.tar.gz: c8a1825d7cd7ed1099b4ec2c5e1584758006602c
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 13e06982a7503a95fdda5119a5e1f3e8258717f4e15997fd5a7b4c9d85d77e1831631d237cefedbe973d5a82d8595fba9c7fcaf8ccb356c5b06695c28e53506c
|
7
|
-
data.tar.gz: 5e3e440b0e205429bc797256c93297073c3d15d8d3f8865d0facf46edf22815e79102024bdf4a79b3a78bdff0be66d903d25b4900ea76a6d6c45a5d9c8b3693a
|