~lynxman/ubuntu/precise/puppet/puppetlabsfixbug12844

« back to all changes in this revision

Viewing changes to .pc/CVE-2011-3872.patch/lib/puppet/network/client/report.rb

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-10-24 15:05:12 UTC
  • Revision ID: james.westby@ubuntu.com-20111024150512-yxqwfdp6hcs6of5l
Tags: 2.7.1-1ubuntu3.2
* SECURITY UPDATE: puppet master impersonation via incorrect certificates
  - debian/patches/CVE-2011-3872.patch: refactor certificate handling.
  - Thanks to upstream for providing the patch.
  - CVE-2011-3872

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
class Puppet::Network::Client::Report < Puppet::Network::Client
 
2
  @handler = Puppet::Network::Handler.handler(:report)
 
3
 
 
4
  def initialize(hash = {})
 
5
    hash[:Report] = self.class.handler.new if hash.include?(:Report)
 
6
 
 
7
    super(hash)
 
8
  end
 
9
 
 
10
  # Send our report.  We get the transaction report and convert it to YAML
 
11
  # as appropriate.
 
12
  def report(transreport)
 
13
    report = YAML.dump(transreport)
 
14
 
 
15
    report = CGI.escape(report) unless self.local
 
16
 
 
17
    # Now send the report
 
18
    file = nil
 
19
    benchmark(:info, "Sent transaction report") do
 
20
      file = @driver.report(report)
 
21
    end
 
22
 
 
23
    file
 
24
  end
 
25
end
 
26