kl-ruby-saml 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/{ruby-saml.gemspec → kl-ruby-saml.gemspec} +3 -3
- data/lib/onelogin/ruby-saml/version.rb +1 -1
- data/lib/xml_security.rb +11 -3
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f10dab83bddcac22ae4b48210685ffa07fc73f67
|
|
4
|
+
data.tar.gz: 49b15bbbbbee24f12eb825649b440691582de333
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 912cf80af8a53c095753e44564c94b48a780e23b2ec525e28156f8f06f529e3289192711556ac17c7a857ad8bc8aa169557ed62f8f7c97d393af67fb94603641
|
|
7
|
+
data.tar.gz: 2b402883126bddb72bb26fd6408a31139057763c8a67fd973cb42e9695bc017fa2789b18cca16b0b61dcf95c2223e57c985ccb175514b7f3590de6e429aec944
|
|
@@ -6,10 +6,10 @@ Gem::Specification.new do |s|
|
|
|
6
6
|
s.version = OneLogin::RubySaml::VERSION
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
9
|
-
s.authors = ["OneLogin LLC", "Knightlabs LLC"]
|
|
9
|
+
s.authors = ["OneLogin LLC", "Knightlabs, LLC"]
|
|
10
10
|
s.date = Time.now.strftime("%Y-%m-%d")
|
|
11
|
-
s.description = %q{
|
|
12
|
-
s.email = %q{support@
|
|
11
|
+
s.description = %q{SAML toolkit for Ruby on Rails}
|
|
12
|
+
s.email = %q{support@onelogin.com}
|
|
13
13
|
s.license = 'MIT'
|
|
14
14
|
s.extra_rdoc_files = [
|
|
15
15
|
"LICENSE",
|
data/lib/xml_security.rb
CHANGED
|
@@ -262,6 +262,12 @@ module XMLSecurity
|
|
|
262
262
|
'//ds:CanonicalizationMethod',
|
|
263
263
|
'ds' => DSIG
|
|
264
264
|
)
|
|
265
|
+
|
|
266
|
+
noko_signed_info_reference_element_uri_attr = noko_signed_info_element.at_xpath('./ds:Reference', 'ds' => DSIG).attributes["URI"]
|
|
267
|
+
if (noko_signed_info_reference_element_uri_attr.value.empty?)
|
|
268
|
+
noko_signed_info_reference_element_uri_attr.value = "##{document.root.attribute('ID')}"
|
|
269
|
+
end
|
|
270
|
+
|
|
265
271
|
canon_string = noko_signed_info_element.canonicalize(canon_algorithm)
|
|
266
272
|
noko_sig_element.remove
|
|
267
273
|
|
|
@@ -269,8 +275,8 @@ module XMLSecurity
|
|
|
269
275
|
REXML::XPath.each(@sig_element, "//ds:Reference", {"ds"=>DSIG}) do |ref|
|
|
270
276
|
uri = ref.attributes.get_attribute("URI").value
|
|
271
277
|
|
|
272
|
-
|
|
273
|
-
hashed_element =
|
|
278
|
+
hashed_element = uri.empty? ? document : document.at_xpath("//*[@ID=$uri]", nil, { 'uri' => uri[1..-1] })
|
|
279
|
+
# hashed_element = document.at_xpath("//*[@ID=$uri]", nil, { 'uri' => uri[1..-1] })
|
|
274
280
|
canon_algorithm = canon_algorithm REXML::XPath.first(
|
|
275
281
|
ref,
|
|
276
282
|
'//ds:CanonicalizationMethod',
|
|
@@ -337,7 +343,9 @@ module XMLSecurity
|
|
|
337
343
|
"//ds:Signature/ds:SignedInfo/ds:Reference",
|
|
338
344
|
{"ds"=>DSIG}
|
|
339
345
|
)
|
|
340
|
-
|
|
346
|
+
|
|
347
|
+
sei = reference_element.attribute("URI").value[1..-1] unless reference_element.nil?
|
|
348
|
+
self.signed_element_id = sei.nil? ? self.root.attribute("ID") : sei
|
|
341
349
|
end
|
|
342
350
|
|
|
343
351
|
def extract_inclusive_namespaces
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kl-ruby-saml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OneLogin LLC
|
|
8
|
-
- Knightlabs LLC
|
|
8
|
+
- Knightlabs, LLC
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-07-
|
|
12
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: uuid
|
|
@@ -151,8 +151,8 @@ dependencies:
|
|
|
151
151
|
- - ">="
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
153
|
version: '0'
|
|
154
|
-
description:
|
|
155
|
-
email: support@
|
|
154
|
+
description: SAML toolkit for Ruby on Rails
|
|
155
|
+
email: support@onelogin.com
|
|
156
156
|
executables: []
|
|
157
157
|
extensions: []
|
|
158
158
|
extra_rdoc_files:
|
|
@@ -168,6 +168,7 @@ files:
|
|
|
168
168
|
- Rakefile
|
|
169
169
|
- changelog.md
|
|
170
170
|
- gemfiles/nokogiri-1.5.gemfile
|
|
171
|
+
- kl-ruby-saml.gemspec
|
|
171
172
|
- lib/onelogin/ruby-saml.rb
|
|
172
173
|
- lib/onelogin/ruby-saml/attribute_service.rb
|
|
173
174
|
- lib/onelogin/ruby-saml/attributes.rb
|
|
@@ -200,7 +201,6 @@ files:
|
|
|
200
201
|
- lib/schemas/xml.xsd
|
|
201
202
|
- lib/schemas/xmldsig-core-schema.xsd
|
|
202
203
|
- lib/xml_security.rb
|
|
203
|
-
- ruby-saml.gemspec
|
|
204
204
|
- test/certificates/certificate1
|
|
205
205
|
- test/certificates/certificate_without_head_foot
|
|
206
206
|
- test/certificates/formatted_certificate
|