ruby-saml-uppercase 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ module Onelogin
35
35
 
36
36
  def create_unauth_xml_doc(settings, params)
37
37
 
38
- time = Time.new().strftime("%Y-%m-%dT%H:%M:%SZ")
38
+ time = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
39
39
 
40
40
  request_doc = REXML::Document.new
41
41
  root = request_doc.add_element "samlp:LogoutRequest", { "xmlns:samlp" => "urn:oasis:names:tc:SAML:2.0:protocol" }
@@ -1,5 +1,5 @@
1
1
  module Onelogin
2
2
  module Saml
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
4
4
  end
5
5
  end
@@ -27,6 +27,7 @@ require "rexml/document"
27
27
  require "rexml/xpath"
28
28
  require "openssl"
29
29
  require 'nokogiri'
30
+ require 'xmlcanonicalizer'
30
31
  require "digest/sha1"
31
32
  require "digest/sha2"
32
33
  require "onelogin/ruby-saml/validation_error"
@@ -77,7 +78,9 @@ module XMLSecurity
77
78
 
78
79
 
79
80
  # verify signature
81
+ canoner = XML::Util::XmlCanonicalizer.new(false, true)
80
82
  signed_info_element = REXML::XPath.first(sig_element, "//ds:SignedInfo", {"ds"=>DSIG})
83
+ canon_string = canoner.canonicalize(signed_info_element)
81
84
  self.noko_sig_element ||= document.at_xpath('//ds:Signature', 'ds' => DSIG)
82
85
  noko_signed_info_element = noko_sig_element.at_xpath('./ds:SignedInfo', 'ds' => DSIG)
83
86
  canon_algorithm = canon_algorithm REXML::XPath.first(sig_element, '//ds:CanonicalizationMethod')
@@ -3,7 +3,7 @@
3
3
  def default_response_opts
4
4
  {
5
5
  :uuid => "_28024690-000e-0130-b6d2-38f6b112be8b",
6
- :issue_instant => Time.now.strftime('%Y-%m-%dT%H:%M:%SZ'),
6
+ :issue_instant => Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ'),
7
7
  :settings => settings
8
8
  }
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-saml-uppercase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
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-11-08 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: canonix