samlr 2.4.0 → 2.4.1

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 574871d6c97431297604a86ffd9a5d6e1adb7008
4
- data.tar.gz: d8c7efd947792092d911ce6a12b5b21917852198
3
+ metadata.gz: 0f3f8a1071f3f774c3a9d624731c7e6aab77ce61
4
+ data.tar.gz: c4c25e98aa62abfaa17733a41fe1732003148bb5
5
5
  SHA512:
6
- metadata.gz: 25f838972bc1b93d970da4dace7cd6a2cd94dfcccd5fbfb823c1fb931239233012779cf96abe3f56e1c5a0a8d13a3c62e67839f38868041191aaf5ec17c7f9b3
7
- data.tar.gz: cffb65ac150882ac090629f691c4ae0e0196130e08a6d020236e7136a21caebdcad6d9b62238fb464634b3ea6e4e8e4e5f436fd9fad8aa3a226aef367405d3f1
6
+ metadata.gz: f7b190788159255d83cef081bdae91f344865168926f2e63dc083e4ef4bf7e12780a6154af4ce398c7726260bf92df0eec38237b5e6197e2fc2b70e1d7ad72fa
7
+ data.tar.gz: 8c8f29c3e09782ed5f870ed9a73763a78f24fa6f28f158d8e06b91e2d81f7d2d7781600d9e25b692d4f1102e3dd24443fc444ee7114f6c259f9818979f07644e
@@ -48,7 +48,11 @@ module Samlr
48
48
  end
49
49
 
50
50
  def name_id
51
- @name_id ||= name_id_node.text
51
+ if !name_id_node
52
+ raise Samlr::FormatError.new("Invalid SAML response: name_id missing")
53
+ else
54
+ @name_id ||= name_id_node.text
55
+ end
52
56
  end
53
57
 
54
58
  def name_id_options
@@ -19,13 +19,13 @@ module Samlr
19
19
  auth_context = options[:auth_context] || "urn:oasis:names:tc:SAML:2.0:ac:classes:Password"
20
20
  issuer = options[:issuer] || "ResponseBuilder IdP"
21
21
  attributes = options[:attributes] || {}
22
+ name_id = options[:name_id]
22
23
  name_qualifier = options[:name_qualifier]
23
24
  sp_name_qualifier = options[:sp_name_qualifier]
24
25
 
25
26
  # Mandatory for responses
26
27
  destination = options.fetch(:destination)
27
28
  in_response_to = options.fetch(:in_response_to)
28
- name_id = options.fetch(:name_id)
29
29
  not_on_or_after = options.fetch(:not_on_or_after)
30
30
  not_before = options.fetch(:not_before)
31
31
  audience = options.fetch(:audience)
@@ -55,7 +55,7 @@ module Samlr
55
55
  name_id_options.merge!("NameQualifier" => name_qualifier) unless name_qualifier.nil?
56
56
  name_id_options.merge!("SPNameQualifier" => sp_name_qualifier) unless sp_name_qualifier.nil?
57
57
 
58
- xml["saml"].NameID(name_id, name_id_options)
58
+ xml["saml"].NameID(name_id, name_id_options) unless name_id.nil?
59
59
 
60
60
  xml["saml"].SubjectConfirmation("Method" => subject_conf_m) do
61
61
  xml["saml"].SubjectConfirmationData("InResponseTo" => in_response_to, "NotOnOrAfter" => not_on_or_after, "Recipient" => destination)
@@ -1,3 +1,3 @@
1
1
  module Samlr
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samlr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morten Primdahl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -158,4 +158,3 @@ signing_key:
158
158
  specification_version: 4
159
159
  summary: Ruby tools for SAML
160
160
  test_files: []
161
- has_rdoc: