newrelic_rpm 3.3.2 → 3.3.2.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of newrelic_rpm might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v3.3.2.1
2
+ * [SECURITY] fix for cookie handling by End User Monitoring instrumentation
3
+
1
4
  v3.3.2
2
5
  * deployments recipe change: truncate git SHAs to 7 characters
3
6
  * Fixes for obfuscation of PostgreSQL and SQLite queries
@@ -1,3 +1,5 @@
1
+ require 'erb'
2
+
1
3
  module NewRelic
2
4
  module Agent
3
5
  class TransactionInfo
@@ -48,17 +50,22 @@ module NewRelic
48
50
  def self.reset(request=nil)
49
51
  clear
50
52
  instance = get
53
+ instance.token = get_token(request)
54
+ end
51
55
 
52
- if request
53
- agent_flag = request.cookies['NRAGENT']
54
- if agent_flag
55
- s = agent_flag.split("=")
56
- if s.length == 2
57
- if s[0] == "tk" && s[1]
58
- instance.token = s[1]
59
- end
56
+ def self.get_token(request)
57
+ return nil unless request
58
+
59
+ agent_flag = request.cookies['NRAGENT']
60
+ if agent_flag
61
+ s = agent_flag.split("=")
62
+ if s.length == 2
63
+ if s[0] == "tk" && s[1]
64
+ ERB::Util.h(s[1])
60
65
  end
61
66
  end
67
+ else
68
+ nil
62
69
  end
63
70
  end
64
71
  end
@@ -4,7 +4,7 @@ module NewRelic
4
4
  MAJOR = 3
5
5
  MINOR = 3
6
6
  TINY = 2
7
- BUILD = nil # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
7
+ BUILD = 1 # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
10
10
 
@@ -4,21 +4,15 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{newrelic_rpm}
8
- s.version = "3.3.2"
7
+ s.name = "newrelic_rpm"
8
+ s.version = "3.3.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Kayser", "Jon Guymon", "Justin George", "Darin Swanson"]
12
- s.date = %q{2012-02-16}
13
- s.description = %q{New Relic is a performance management system, developed by New Relic,
14
- Inc (http://www.newrelic.com). New Relic provides you with deep
15
- information about the performance of your web application as it runs
16
- in production. The New Relic Ruby Agent is dual-purposed as a either a
17
- Gem or plugin, hosted on
18
- http://github.com/newrelic/rpm/
19
- }
20
- s.email = %q{support@newrelic.com}
21
- s.executables = ["newrelic_cmd", "newrelic", "mongrel_rpm"]
12
+ s.date = "2012-03-15"
13
+ s.description = "New Relic is a performance management system, developed by New Relic,\nInc (http://www.newrelic.com). New Relic provides you with deep\ninformation about the performance of your web application as it runs\nin production. The New Relic Ruby Agent is dual-purposed as a either a\nGem or plugin, hosted on\nhttp://github.com/newrelic/rpm/\n"
14
+ s.email = "support@newrelic.com"
15
+ s.executables = ["newrelic", "newrelic_cmd", "mongrel_rpm"]
22
16
  s.extra_rdoc_files = [
23
17
  "CHANGELOG",
24
18
  "LICENSE",
@@ -176,6 +170,7 @@ http://github.com/newrelic/rpm/
176
170
  "test/new_relic/agent/stats_engine/metric_stats_test.rb",
177
171
  "test/new_relic/agent/stats_engine/samplers_test.rb",
178
172
  "test/new_relic/agent/stats_engine_test.rb",
173
+ "test/new_relic/agent/transaction_info_test.rb",
179
174
  "test/new_relic/agent/transaction_sample_builder_test.rb",
180
175
  "test/new_relic/agent/transaction_sampler_test.rb",
181
176
  "test/new_relic/agent/worker_loop_test.rb",
@@ -286,28 +281,8 @@ http://github.com/newrelic/rpm/
286
281
  "vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb",
287
282
  "vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb"
288
283
  ]
289
- s.homepage = %q{http://www.github.com/newrelic/rpm}
290
- s.post_install_message = %q{
291
- PLEASE NOTE:
292
-
293
- Developer Mode is now a Rack middleware.
294
-
295
- Developer Mode is no longer available in Rails 2.1 and earlier.
296
- However, starting in version 2.12 you can use Developer Mode in any
297
- Rack based framework, in addition to Rails. To install developer mode
298
- in a non-Rails application, just add NewRelic::Rack::DeveloperMode to
299
- your middleware stack.
300
-
301
- If you are using JRuby, we recommend using at least version 1.4 or
302
- later because of issues with the implementation of the timeout library.
303
-
304
- Refer to the README.md file for more information.
305
-
306
- Please see http://github.com/newrelic/rpm/blob/master/CHANGELOG
307
- for a complete description of the features and enhancements available
308
- in version 3.3 of the Ruby Agent.
309
-
310
- }
284
+ s.homepage = "http://www.github.com/newrelic/rpm"
285
+ s.post_install_message = "\nPLEASE NOTE:\n\nDeveloper Mode is now a Rack middleware.\n\nDeveloper Mode is no longer available in Rails 2.1 and earlier.\nHowever, starting in version 2.12 you can use Developer Mode in any\nRack based framework, in addition to Rails. To install developer mode\nin a non-Rails application, just add NewRelic::Rack::DeveloperMode to\nyour middleware stack.\n\nIf you are using JRuby, we recommend using at least version 1.4 or \nlater because of issues with the implementation of the timeout library.\n\nRefer to the README.md file for more information.\n\nPlease see http://github.com/newrelic/rpm/blob/master/CHANGELOG\nfor a complete description of the features and enhancements available\nin version 3.3 of the Ruby Agent.\n \n"
311
286
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "New Relic Ruby Agent"]
312
287
  s.require_paths = ["lib"]
313
288
  s.summary = "New Relic Ruby Agent"
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
2
+ require 'ostruct'
3
+
4
+ class NewRelic::Agent::TransactionInfoTest < Test::Unit::TestCase
5
+ def setup
6
+ @request = OpenStruct.new(:cookies => {'NRAGENT' => 'tk=1234<tag>evil</tag>5678'})
7
+ end
8
+
9
+ def test_get_token_gets_sanitized_token_from_cookie
10
+ assert_equal('1234&lt;tag&gt;evil&lt;/tag&gt;5678',
11
+ NewRelic::Agent::TransactionInfo.get_token(@request))
12
+ end
13
+ end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 109
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 2
10
- version: 3.3.2
10
+ - 1
11
+ version: 3.3.2.1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Bill Kayser
@@ -18,8 +19,7 @@ autorequire:
18
19
  bindir: bin
19
20
  cert_chain: []
20
21
 
21
- date: 2012-02-16 00:00:00 -08:00
22
- default_executable:
22
+ date: 2012-03-15 00:00:00 Z
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: jeweler
@@ -73,8 +73,8 @@ description: |
73
73
 
74
74
  email: support@newrelic.com
75
75
  executables:
76
- - newrelic_cmd
77
76
  - newrelic
77
+ - newrelic_cmd
78
78
  - mongrel_rpm
79
79
  extensions: []
80
80
 
@@ -234,6 +234,7 @@ files:
234
234
  - test/new_relic/agent/stats_engine/metric_stats_test.rb
235
235
  - test/new_relic/agent/stats_engine/samplers_test.rb
236
236
  - test/new_relic/agent/stats_engine_test.rb
237
+ - test/new_relic/agent/transaction_info_test.rb
237
238
  - test/new_relic/agent/transaction_sample_builder_test.rb
238
239
  - test/new_relic/agent/transaction_sampler_test.rb
239
240
  - test/new_relic/agent/worker_loop_test.rb
@@ -343,7 +344,6 @@ files:
343
344
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb
344
345
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb
345
346
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb
346
- has_rdoc: true
347
347
  homepage: http://www.github.com/newrelic/rpm
348
348
  licenses: []
349
349
 
@@ -397,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
397
397
  requirements: []
398
398
 
399
399
  rubyforge_project:
400
- rubygems_version: 1.4.2
400
+ rubygems_version: 1.8.15
401
401
  signing_key:
402
402
  specification_version: 3
403
403
  summary: New Relic Ruby Agent