actionpack 5.0.0.beta1 → 5.0.0.beta1.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c08a2a9ff55bdc33124d0f4381c07760230e956
|
4
|
+
data.tar.gz: 553434784aa0485a9da3040c51620d132e9f6cd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92aa1f71eb971a0a949a6192c634f2bbab1ee06a8a103ac12b723d3875bdb57c461529dad3121b449944d55dc3f03cb4ceed23e6512cbbed833e42c2a98357a4
|
7
|
+
data.tar.gz: 0ca4502fde02f1cd4f31402fc760250e1a3583790def111feab5dce600e68a6486dd39cdfe0adf40ed07b1a704f24b8fbd05f2ef9147a0485c9ab10df8bf7849
|
@@ -82,7 +82,13 @@ module AbstractController
|
|
82
82
|
# <tt>render :file => "foo/bar"</tt>.
|
83
83
|
# :api: plugin
|
84
84
|
def _normalize_args(action=nil, options={})
|
85
|
-
|
85
|
+
case action
|
86
|
+
when ActionController::Parameters
|
87
|
+
unless action.permitted?
|
88
|
+
raise ArgumentError, "render parameters are not permitted"
|
89
|
+
end
|
90
|
+
action
|
91
|
+
when Hash
|
86
92
|
action
|
87
93
|
else
|
88
94
|
options
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'base64'
|
2
|
+
require 'active_support/security_utils'
|
2
3
|
|
3
4
|
module ActionController
|
4
5
|
# Makes it dead easy to do HTTP Basic, Digest and Token authentication.
|
@@ -68,7 +69,11 @@ module ActionController
|
|
68
69
|
def http_basic_authenticate_with(options = {})
|
69
70
|
before_action(options.except(:name, :password, :realm)) do
|
70
71
|
authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password|
|
71
|
-
|
72
|
+
# This comparison uses & so that it doesn't short circuit and
|
73
|
+
# uses `variable_size_secure_compare` so that length information
|
74
|
+
# isn't leaked.
|
75
|
+
ActiveSupport::SecurityUtils.variable_size_secure_compare(name, options[:name]) &
|
76
|
+
ActiveSupport::SecurityUtils.variable_size_secure_compare(password, options[:password])
|
72
77
|
end
|
73
78
|
end
|
74
79
|
end
|
@@ -31,7 +31,7 @@ module Mime
|
|
31
31
|
|
32
32
|
SET = Mimes.new
|
33
33
|
EXTENSION_LOOKUP = {}
|
34
|
-
LOOKUP =
|
34
|
+
LOOKUP = {}
|
35
35
|
|
36
36
|
class << self
|
37
37
|
def [](type)
|
@@ -177,7 +177,7 @@ module Mime
|
|
177
177
|
end
|
178
178
|
|
179
179
|
def lookup(string)
|
180
|
-
LOOKUP[string]
|
180
|
+
LOOKUP[string] || Type.new(string)
|
181
181
|
end
|
182
182
|
|
183
183
|
def lookup_by_extension(extension)
|
@@ -255,9 +255,12 @@ module Mime
|
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
258
|
+
attr_reader :hash
|
259
|
+
|
258
260
|
def initialize(string, symbol = nil, synonyms = [])
|
259
261
|
@symbol, @synonyms = symbol, synonyms
|
260
262
|
@string = string
|
263
|
+
@hash = [@string, @synonyms, @symbol].hash
|
261
264
|
end
|
262
265
|
|
263
266
|
def to_s
|
@@ -291,6 +294,13 @@ module Mime
|
|
291
294
|
end
|
292
295
|
end
|
293
296
|
|
297
|
+
def eql?(other)
|
298
|
+
super || (self.class == other.class &&
|
299
|
+
@string == other.string &&
|
300
|
+
@synonyms == other.synonyms &&
|
301
|
+
@symbol == other.symbol)
|
302
|
+
end
|
303
|
+
|
294
304
|
def =~(mime_type)
|
295
305
|
return false unless mime_type
|
296
306
|
regexp = Regexp.new(Regexp.quote(mime_type.to_s))
|
@@ -303,6 +313,10 @@ module Mime
|
|
303
313
|
|
304
314
|
def all?; false; end
|
305
315
|
|
316
|
+
protected
|
317
|
+
|
318
|
+
attr_reader :string, :synonyms
|
319
|
+
|
306
320
|
private
|
307
321
|
|
308
322
|
def to_ary; end
|
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: 5.0.0.beta1
|
4
|
+
version: 5.0.0.beta1.1
|
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:
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.0.beta1
|
19
|
+
version: 5.0.0.beta1.1
|
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: 5.0.0.beta1
|
26
|
+
version: 5.0.0.beta1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,28 +98,28 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - '='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 5.0.0.beta1
|
101
|
+
version: 5.0.0.beta1.1
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - '='
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: 5.0.0.beta1
|
108
|
+
version: 5.0.0.beta1.1
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: activemodel
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
113
|
- - '='
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 5.0.0.beta1
|
115
|
+
version: 5.0.0.beta1.1
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
120
|
- - '='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 5.0.0.beta1
|
122
|
+
version: 5.0.0.beta1.1
|
123
123
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
124
124
|
testing MVC web applications. Works with any Rack-compatible server.
|
125
125
|
email: david@loudthinking.com
|
@@ -304,4 +304,3 @@ signing_key:
|
|
304
304
|
specification_version: 4
|
305
305
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|
306
306
|
test_files: []
|
307
|
-
has_rdoc:
|