actionpack 3.1.10 → 3.1.11
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.
- checksums.yaml +6 -6
- data/CHANGELOG.md +9 -3
- data/lib/action_controller/caching/fragments.rb +18 -19
- data/lib/action_controller/metal/http_authentication.rb +1 -1
- data/lib/action_dispatch/http/filter_parameters.rb +1 -3
- data/lib/action_dispatch/http/response.rb +2 -1
- data/lib/action_dispatch/middleware/head.rb +1 -1
- data/lib/action_dispatch/middleware/params_parser.rb +2 -2
- data/lib/action_dispatch/testing/integration.rb +0 -3
- data/lib/action_pack/version.rb +1 -1
- data/lib/action_view/helpers/debug_helper.rb +1 -1
- data/lib/action_view/renderer/template_renderer.rb +1 -1
- data/lib/action_view/template/error.rb +0 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3e37bbcafb1b07b0732f02113ac4d8a0b50dccf9
|
4
|
+
data.tar.gz: 3741c6f652f01ea438825ce7a8d72874b5183332
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e27fb48371aadb9db7d34b68bae46c9b17509695d3387ea55817bfb6007648e3b607f7e0a855c800449d67f1f5e567b99b37921f42c1a177f397d01ddbe21139
|
7
|
+
data.tar.gz: bf22b6ca891c7b117257330d8277696c37a6e251c24bd09f1ceeb646dbccf19c275d901f74e4afaf63788878bec672052b7c8792f00a692cc0eb3f9c4c121359
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
-
## Rails 3.1.
|
1
|
+
## Rails 3.1.11 (unreleased)
|
2
|
+
|
3
|
+
* Fixed JSON params parsing regression for non-object JSON content.
|
4
|
+
|
5
|
+
## Rails 3.1.10 (Jan 8, 2013)
|
2
6
|
|
3
7
|
* Strip nils from collections on JSON and XML posts. [CVE-2013-0155]
|
4
8
|
|
5
|
-
## Rails 3.1.9
|
9
|
+
## Rails 3.1.9 (Jan 2, 2013)
|
10
|
+
|
11
|
+
* No changes.
|
6
12
|
|
7
13
|
## Rails 3.1.8 (Aug 9, 2012)
|
8
14
|
|
@@ -45,7 +51,7 @@
|
|
45
51
|
|
46
52
|
## Rails 3.1.4 (unreleased) ##
|
47
53
|
|
48
|
-
* :subdomain can now be specified with a value of false in url_for,
|
54
|
+
* :subdomain can now be specified with a value of false in url_for,
|
49
55
|
allowing for subdomain(s) removal from the host during link generation. GH #4083
|
50
56
|
|
51
57
|
*Arun Agrawal*
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module ActionController #:nodoc:
|
2
2
|
module Caching
|
3
|
-
# Fragment caching is used for caching various blocks within
|
3
|
+
# Fragment caching is used for caching various blocks within
|
4
4
|
# views without caching the entire action as a whole. This is
|
5
|
-
# useful when certain elements of an action change frequently or
|
6
|
-
# depend on complicated state while other parts rarely change or
|
5
|
+
# useful when certain elements of an action change frequently or
|
6
|
+
# depend on complicated state while other parts rarely change or
|
7
7
|
# can be shared amongst multiple parties. The caching is done using
|
8
|
-
# the <tt>cache</tt> helper available in the Action View. A
|
8
|
+
# the <tt>cache</tt> helper available in the Action View. A
|
9
9
|
# template with fragment caching might look like:
|
10
10
|
#
|
11
11
|
# <b>Hello <%= @name %></b>
|
@@ -16,21 +16,21 @@ module ActionController #:nodoc:
|
|
16
16
|
# <% end %>
|
17
17
|
#
|
18
18
|
# This cache will bind the name of the action that called it, so if
|
19
|
-
# this code was part of the view for the topics/list action, you
|
19
|
+
# this code was part of the view for the topics/list action, you
|
20
20
|
# would be able to invalidate it using:
|
21
|
-
#
|
21
|
+
#
|
22
22
|
# expire_fragment(:controller => "topics", :action => "list")
|
23
23
|
#
|
24
|
-
# This default behavior is limited if you need to cache multiple
|
25
|
-
# fragments per action or if the action itself is cached using
|
26
|
-
# <tt>caches_action</tt>. To remedy this, there is an option to
|
27
|
-
# qualify the name of the cached fragment by using the
|
24
|
+
# This default behavior is limited if you need to cache multiple
|
25
|
+
# fragments per action or if the action itself is cached using
|
26
|
+
# <tt>caches_action</tt>. To remedy this, there is an option to
|
27
|
+
# qualify the name of the cached fragment by using the
|
28
28
|
# <tt>:action_suffix</tt> option:
|
29
29
|
#
|
30
30
|
# <% cache(:action => "list", :action_suffix => "all_topics") do %>
|
31
31
|
#
|
32
|
-
# That would result in a name such as
|
33
|
-
# <tt>/topics/list/all_topics</tt>, avoiding conflicts with the
|
32
|
+
# That would result in a name such as
|
33
|
+
# <tt>/topics/list/all_topics</tt>, avoiding conflicts with the
|
34
34
|
# action cache and with any fragments that use a different suffix.
|
35
35
|
# Note that the URL doesn't have to really exist or be callable
|
36
36
|
# - the url_for system is just used to generate unique cache names
|
@@ -38,21 +38,21 @@ module ActionController #:nodoc:
|
|
38
38
|
#
|
39
39
|
# The expiration call for this example is:
|
40
40
|
#
|
41
|
-
# expire_fragment(:controller => "topics",
|
42
|
-
# :action => "list",
|
41
|
+
# expire_fragment(:controller => "topics",
|
42
|
+
# :action => "list",
|
43
43
|
# :action_suffix => "all_topics")
|
44
44
|
module Fragments
|
45
45
|
# Given a key (as described in <tt>expire_fragment</tt>), returns
|
46
|
-
# a key suitable for use in reading, writing, or expiring a
|
46
|
+
# a key suitable for use in reading, writing, or expiring a
|
47
47
|
# cached fragment. If the key is a hash, the generated key is the
|
48
|
-
# return value of url_for on that hash (without the protocol).
|
48
|
+
# return value of url_for on that hash (without the protocol).
|
49
49
|
# All keys are prefixed with <tt>views/</tt> and uses
|
50
50
|
# ActiveSupport::Cache.expand_cache_key for the expansion.
|
51
51
|
def fragment_cache_key(key)
|
52
52
|
ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views)
|
53
53
|
end
|
54
54
|
|
55
|
-
# Writes <tt>content</tt> to the location signified by
|
55
|
+
# Writes <tt>content</tt> to the location signified by
|
56
56
|
# <tt>key</tt> (see <tt>expire_fragment</tt> for acceptable formats).
|
57
57
|
def write_fragment(key, content, options = nil)
|
58
58
|
return content unless cache_configured?
|
@@ -77,7 +77,7 @@ module ActionController #:nodoc:
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
# Check if a cached fragment from the location signified by
|
80
|
+
# Check if a cached fragment from the location signified by
|
81
81
|
# <tt>key</tt> exists (see <tt>expire_fragment</tt> for acceptable formats)
|
82
82
|
def fragment_exist?(key, options = nil)
|
83
83
|
return unless cache_configured?
|
@@ -109,7 +109,6 @@ module ActionController #:nodoc:
|
|
109
109
|
def expire_fragment(key, options = nil)
|
110
110
|
return unless cache_configured?
|
111
111
|
key = fragment_cache_key(key) unless key.is_a?(Regexp)
|
112
|
-
message = nil
|
113
112
|
|
114
113
|
instrument_fragment_cache :expire_fragment, key do
|
115
114
|
if key.is_a?(Regexp)
|
@@ -426,7 +426,7 @@ module ActionController
|
|
426
426
|
# Returns an Array of [String, Hash] if a token is present.
|
427
427
|
# Returns nil if no token is found.
|
428
428
|
def token_and_options(request)
|
429
|
-
if
|
429
|
+
if request.authorization.to_s[/^Token (.*)/]
|
430
430
|
values = Hash[$1.split(',').map do |value|
|
431
431
|
value.strip! # remove any spaces between commas and values
|
432
432
|
key, value = value.split(/\=\"?/) # split key=value pairs
|
@@ -26,8 +26,6 @@ module ActionDispatch
|
|
26
26
|
module FilterParameters
|
27
27
|
extend ActiveSupport::Concern
|
28
28
|
|
29
|
-
@@parameter_filter_for = {}
|
30
|
-
|
31
29
|
# Return a hash of parameters with all sensitive data replaced.
|
32
30
|
def filtered_parameters
|
33
31
|
@filtered_parameters ||= parameter_filter.filter(parameters)
|
@@ -54,7 +52,7 @@ module ActionDispatch
|
|
54
52
|
end
|
55
53
|
|
56
54
|
def parameter_filter_for(filters)
|
57
|
-
|
55
|
+
ParameterFilter.new(filters)
|
58
56
|
end
|
59
57
|
|
60
58
|
KV_RE = '[^&;=]+'
|
@@ -8,7 +8,7 @@ module ActionDispatch
|
|
8
8
|
if env["REQUEST_METHOD"] == "HEAD"
|
9
9
|
env["REQUEST_METHOD"] = "GET"
|
10
10
|
env["rack.methodoverride.original_method"] = "HEAD"
|
11
|
-
status, headers,
|
11
|
+
status, headers, _ = @app.call(env)
|
12
12
|
[status, headers, []]
|
13
13
|
else
|
14
14
|
@app.call(env)
|
@@ -44,10 +44,10 @@ module ActionDispatch
|
|
44
44
|
when :yaml
|
45
45
|
YAML.load(request.raw_post)
|
46
46
|
when :json
|
47
|
-
data =
|
47
|
+
data = ActiveSupport::JSON.decode(request.body)
|
48
48
|
request.body.rewind if request.body.respond_to?(:rewind)
|
49
49
|
data = {:_json => data} unless data.is_a?(Hash)
|
50
|
-
data.with_indifferent_access
|
50
|
+
request.deep_munge(data).with_indifferent_access
|
51
51
|
else
|
52
52
|
false
|
53
53
|
end
|
@@ -215,9 +215,6 @@ module ActionDispatch
|
|
215
215
|
"*/*;q=0.5"
|
216
216
|
|
217
217
|
unless defined? @named_routes_configured
|
218
|
-
# install the named routes in this session instance.
|
219
|
-
klass = singleton_class
|
220
|
-
|
221
218
|
# the helpers are made protected by default--we make them public for
|
222
219
|
# easier access during testing and troubleshooting.
|
223
220
|
@named_routes_configured = true
|
data/lib/action_pack/version.rb
CHANGED
@@ -30,7 +30,7 @@ module ActionView
|
|
30
30
|
begin
|
31
31
|
Marshal::dump(object)
|
32
32
|
"<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", " ")}</pre>".html_safe
|
33
|
-
rescue Exception
|
33
|
+
rescue Exception # errors from Marshal or YAML
|
34
34
|
# Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
|
35
35
|
"<code class='debug_dump'>#{h(object.inspect)}</code>".html_safe
|
36
36
|
end
|
@@ -64,7 +64,7 @@ module ActionView
|
|
64
64
|
layout =~ /^\// ?
|
65
65
|
with_fallbacks { find_template(layout, nil, false, keys) } : find_template(layout, nil, false, keys)
|
66
66
|
end
|
67
|
-
rescue ActionView::MissingTemplate
|
67
|
+
rescue ActionView::MissingTemplate
|
68
68
|
update_details(:formats => nil) do
|
69
69
|
raise unless template_exists?(layout)
|
70
70
|
end
|
@@ -31,7 +31,6 @@ module ActionView
|
|
31
31
|
def initialize(paths, path, prefixes, partial, details, *)
|
32
32
|
@path = path
|
33
33
|
prefixes = Array.wrap(prefixes)
|
34
|
-
display_paths = paths.compact.map{ |p| p.to_s.inspect }.join(", ")
|
35
34
|
template_type = if partial
|
36
35
|
"partial"
|
37
36
|
elsif path =~ /layouts/i
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.1.
|
19
|
+
version: 3.1.11
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.1.
|
26
|
+
version: 3.1.11
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activemodel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.1.
|
33
|
+
version: 3.1.11
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.1.
|
40
|
+
version: 3.1.11
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack-cache
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -379,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
379
379
|
requirements:
|
380
380
|
- none
|
381
381
|
rubyforge_project:
|
382
|
-
rubygems_version: 2.0.0.
|
382
|
+
rubygems_version: 2.0.0.rc.2
|
383
383
|
signing_key:
|
384
384
|
specification_version: 4
|
385
385
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|