saml2 2.2.9 → 2.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85079eef2484ac29ff4b22303b10fa1a08afdeab25c22bd0b3c610324945dabd
4
- data.tar.gz: bb93d0ef57206e8ec3b773b742625c4e5d60f76f696be91786528b5845bef188
3
+ metadata.gz: 453b3acfb0a9b791d213e0c985e36beaddfc915512a9722aee036bfb09e43a24
4
+ data.tar.gz: f725eba226322b37181528c19fcdd320477b4cd67b54775cb0d72a727dd761c0
5
5
  SHA512:
6
- metadata.gz: 4c064cf43d5bd7feb0ecbf1070da413fbf8dcf19e2b5130aa8965367fbb194abf5565000b210fb6a9406c7b49d96e6de4ed613cb94227428a21585c7a35172e1
7
- data.tar.gz: 113b16ec4a20b0af0d60ee9e114e35d1b658ebc259de1ce196d8494269096b2d40bfe2ea9d5a875f03972eb548ac01fc9d3856bc92d9db34cfaf7140dc80c0e1
6
+ metadata.gz: 95845c85c633d58abf0131820a2be7eb8dfdbca1976e60dc77f5b7fafbcb68024089eefe59e99a42778d4e99ab9c808a4cd278f0aa0c7cacf2b1b04e5975f40c
7
+ data.tar.gz: 5b45cd12d4f79353a61e36e47fbcd4b4e0d3fbcd6f3eac62dd640a0e19260f3e5deef64c72b01014a2b43e128d6145d10855dcedb5e6ba31ab1d7441f1334930
@@ -190,7 +190,7 @@ module SAML2
190
190
  # repeated key; convert to array
191
191
  if attribute.value.is_a?(Array)
192
192
  # both values are arrays; concatenate them
193
- prior_value.concat(attribute.value)
193
+ value.concat(attribute.value)
194
194
  else
195
195
  value << attribute.value
196
196
  end
data/lib/saml2/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SAML2
4
- VERSION = '2.2.9'
4
+ VERSION = '2.2.10'
5
5
  end
@@ -109,6 +109,24 @@ XML
109
109
  'eduPersonAffiliation' => 'member',
110
110
  'eduPersonPrincipalName' => 'student@example.edu'})
111
111
  end
112
+
113
+ it "properly combines repeated attributes" do
114
+ attr_statement = AttributeStatement.from_xml(Nokogiri::XML(<<-XML).root)
115
+ <saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
116
+ <saml2:Attribute FriendlyName="eduPersonScopedAffiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
117
+ <saml2:AttributeValue>02</saml2:AttributeValue>
118
+ </saml2:Attribute>
119
+ <saml2:Attribute FriendlyName="eduPersonScopedAffiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
120
+ <saml2:AttributeValue>employee@school.edu</saml2:AttributeValue>
121
+ <saml2:AttributeValue>students@school.edu</saml2:AttributeValue>
122
+ </saml2:Attribute>
123
+ </saml2:AttributeStatement>
124
+ XML
125
+
126
+ expect(attr_statement.to_h).to eq({
127
+ 'eduPersonScopedAffiliation' => ['02', 'employee@school.edu', 'students@school.edu']
128
+ })
129
+ end
112
130
  end
113
131
  end
114
132
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.9
4
+ version: 2.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri