actionpack 3.0.6.rc2 → 3.0.6
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 +11 -1
- data/lib/action_pack/version.rb +1 -1
- data/lib/action_view/helpers/text_helper.rb +2 -2
- metadata +12 -20
data/CHANGELOG
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
*Rails 3.0.6 (
|
1
|
+
*Rails 3.0.6 (April 5, 2011)
|
2
|
+
|
3
|
+
* Fixed XSS vulnerability in `auto_link`. `auto_link` no longer marks input as
|
4
|
+
html safe. Please make sure that calls to auto_link() are wrapped in a
|
5
|
+
sanitize(), or a raw() depending on the type of input passed to auto_link().
|
6
|
+
For example:
|
7
|
+
|
8
|
+
<%= sanitize(auto_link(some_user_input)) %>
|
9
|
+
|
10
|
+
Thanks to Torben Schulz for reporting this. The fix can be found here:
|
11
|
+
61ee3449674c591747db95f9b3472c5c3bd9e84d
|
2
12
|
|
3
13
|
* Fixes the output of `rake routes` to be correctly match to the behavior of the application, as the regular expression used to match the path is greedy and won't capture the format part by default [Prem Sichanugrist]
|
4
14
|
|
data/lib/action_pack/version.rb
CHANGED
@@ -299,7 +299,7 @@ module ActionView
|
|
299
299
|
# # => "Welcome to my new blog at <a href=\"http://www.myblog.com/\" target=\"_blank\">http://www.myblog.com</a>.
|
300
300
|
# Please e-mail me at <a href=\"mailto:me@email.com\">me@email.com</a>."
|
301
301
|
def auto_link(text, *args, &block)#link = :all, html = {}, &block)
|
302
|
-
return ''
|
302
|
+
return '' if text.blank?
|
303
303
|
|
304
304
|
options = args.size == 2 ? {} : args.extract_options! # this is necessary because the old auto_link API has a Hash as its last parameter
|
305
305
|
unless args.empty?
|
@@ -503,7 +503,7 @@ module ActionView
|
|
503
503
|
end
|
504
504
|
content_tag(:a, link_text, link_attributes.merge('href' => href), !!options[:sanitize]) + punctuation.reverse.join('')
|
505
505
|
end
|
506
|
-
end
|
506
|
+
end
|
507
507
|
end
|
508
508
|
|
509
509
|
# Turns all email addresses into clickable links. If a block is given,
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 11
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
9
|
- 6
|
10
|
-
|
11
|
-
- 2
|
12
|
-
version: 3.0.6.rc2
|
10
|
+
version: 3.0.6
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- David Heinemeier Hansson
|
@@ -17,7 +15,7 @@ autorequire:
|
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2011-
|
18
|
+
date: 2011-04-05 00:00:00 -07:00
|
21
19
|
default_executable:
|
22
20
|
dependencies:
|
23
21
|
- !ruby/object:Gem::Dependency
|
@@ -28,14 +26,12 @@ dependencies:
|
|
28
26
|
requirements:
|
29
27
|
- - "="
|
30
28
|
- !ruby/object:Gem::Version
|
31
|
-
hash:
|
29
|
+
hash: 11
|
32
30
|
segments:
|
33
31
|
- 3
|
34
32
|
- 0
|
35
33
|
- 6
|
36
|
-
|
37
|
-
- 2
|
38
|
-
version: 3.0.6.rc2
|
34
|
+
version: 3.0.6
|
39
35
|
type: :runtime
|
40
36
|
version_requirements: *id001
|
41
37
|
- !ruby/object:Gem::Dependency
|
@@ -46,14 +42,12 @@ dependencies:
|
|
46
42
|
requirements:
|
47
43
|
- - "="
|
48
44
|
- !ruby/object:Gem::Version
|
49
|
-
hash:
|
45
|
+
hash: 11
|
50
46
|
segments:
|
51
47
|
- 3
|
52
48
|
- 0
|
53
49
|
- 6
|
54
|
-
|
55
|
-
- 2
|
56
|
-
version: 3.0.6.rc2
|
50
|
+
version: 3.0.6
|
57
51
|
type: :runtime
|
58
52
|
version_requirements: *id002
|
59
53
|
- !ruby/object:Gem::Dependency
|
@@ -364,14 +358,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
364
358
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
365
359
|
none: false
|
366
360
|
requirements:
|
367
|
-
- - "
|
361
|
+
- - ">="
|
368
362
|
- !ruby/object:Gem::Version
|
369
|
-
hash:
|
363
|
+
hash: 3
|
370
364
|
segments:
|
371
|
-
-
|
372
|
-
|
373
|
-
- 1
|
374
|
-
version: 1.3.1
|
365
|
+
- 0
|
366
|
+
version: "0"
|
375
367
|
requirements:
|
376
368
|
- none
|
377
369
|
rubyforge_project: actionpack
|