actionpack 3.1.7 → 3.1.8

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.

@@ -1,3 +1,19 @@
1
+ ## Rails 3.1.8 (Aug 9, 2012)
2
+
3
+ * There is an XSS vulnerability in the strip_tags helper in Ruby on Rails, the
4
+ helper doesn't correctly handle malformed html. As a result an attacker can
5
+ execute arbitrary javascript through the use of specially crafted malformed
6
+ html.
7
+
8
+ *Marek from Nethemba (www.nethemba.com) & Santiago Pastorino*
9
+
10
+ * When a "prompt" value is supplied to the `select_tag` helper, the "prompt" value is not escaped.
11
+ If untrusted data is not escaped, and is supplied as the prompt value, there is a potential for XSS attacks.
12
+ Vulnerable code will look something like this:
13
+ select_tag("name", options, :prompt => UNTRUSTED_INPUT)
14
+
15
+ *Santiago Pastorino*
16
+
1
17
  ## Rails 3.1.7 (Jul 26, 2012)
2
18
 
3
19
  * Do not convert digest auth strings to symbols. CVE-2012-3424
@@ -2,7 +2,7 @@ module ActionPack
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 7
5
+ TINY = 8
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -114,11 +114,11 @@ module ActionView
114
114
  html_name = (options[:multiple] == true && !name.to_s.ends_with?("[]")) ? "#{name}[]" : name
115
115
 
116
116
  if options.delete(:include_blank)
117
- option_tags = "<option value=\"\"></option>".html_safe + option_tags
117
+ option_tags = content_tag(:option, '', :value => '').safe_concat(option_tags)
118
118
  end
119
119
 
120
120
  if prompt = options.delete(:prompt)
121
- option_tags = "<option value=\"\">#{prompt}</option>".html_safe + option_tags
121
+ option_tags = content_tag(:option, prompt, :value => '').safe_concat(option_tags)
122
122
  end
123
123
 
124
124
  content_tag :select, option_tags, { "name" => html_name, "id" => sanitize_to_id(name) }.update(options.stringify_keys)
@@ -81,7 +81,7 @@ module ActionView
81
81
  # strip_tags("<div id='top-bar'>Welcome to my website!</div>")
82
82
  # # => Welcome to my website!
83
83
  def strip_tags(html)
84
- self.class.full_sanitizer.sanitize(html).try(:html_safe)
84
+ self.class.full_sanitizer.sanitize(html)
85
85
  end
86
86
 
87
87
  # Strips all link tags from +text+ leaving just the link text.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.7
4
+ version: 3.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-26 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.1.7
21
+ version: 3.1.8
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.1.7
29
+ version: 3.1.8
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: activemodel
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 3.1.7
37
+ version: 3.1.8
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 3.1.7
45
+ version: 3.1.8
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rack-cache
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -400,10 +400,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
400
400
  - - ! '>='
401
401
  - !ruby/object:Gem::Version
402
402
  version: '0'
403
+ segments:
404
+ - 0
405
+ hash: -695731206002521907
403
406
  requirements:
404
407
  - none
405
408
  rubyforge_project:
406
- rubygems_version: 1.8.23
409
+ rubygems_version: 1.8.24
407
410
  signing_key:
408
411
  specification_version: 3
409
412
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).