ruby-saml-mod 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70a7eb538a2bbed9d2269ccf27a1ae560a40734c
4
- data.tar.gz: dca9f7dd1a7e5e7d3a7e8967af606b3688144c09
3
+ metadata.gz: e9d404302ea776f3b175212215249f3061ea501b
4
+ data.tar.gz: 3d108e0a906275c86781028092469fab13f948be
5
5
  SHA512:
6
- metadata.gz: 1be665813508c314582bebac318758085c74ca7fd3621c58e6df191df83639981eb48fa3b3d6cbad8047765962abddd6fb920a8b8d0f9062d2075293f1ba8d87
7
- data.tar.gz: a9d34492f6c2e8feb08a1bccccb2a53545c88ef336bc1cfb8345fff663ccbee7857bc338970d233877a8b295b44d03779b5f5cadcdeaa2655b5af57acb24e134
6
+ metadata.gz: 33820de0297276af1bc4e3999cfbfa99fa9fd3ed30944f738a25d74dc519f79093894e28d295a8d99ef63c325668280471a5dec25d1b89ea0075e3d554a1e274
7
+ data.tar.gz: 1f21a8319c552f3a55aff13ec07989f7c24913f05e5930cce0e6b62fcd985a09d4698f9b560ff3da6a0eeebab9c9980922594c160b59c359c50bea32e3832d38
@@ -33,7 +33,7 @@ module Onelogin::Saml
33
33
 
34
34
  def generate
35
35
  <<-XML
36
- <samlp:LogoutRequest xmlns:samlp="#{Onelogin::NAMESPACES['samlp']}" xmlns:saml="#{Onelogin::NAMESPACES['saml']}" ID="#{self.id}" Version="2.0" IssueInstant="#{self.issue_instant}" Destination="#{self.destination}">
36
+ <samlp:LogoutRequest xmlns:samlp="#{Onelogin::NAMESPACES['samlp']}" xmlns:saml="#{Onelogin::NAMESPACES['saml']}" ID="#{self.id}" Version="2.0" IssueInstant="#{self.issue_instant}" Destination="#{CGI.escapeHTML(self.destination)}">
37
37
  <saml:Issuer>#{self.issuer}</saml:Issuer>
38
38
  <saml:NameID NameQualifier="#{self.name_qualifier}" SPNameQualifier="#{self.issuer}" Format="#{self.name_identifier_format}">#{self.name_id}</saml:NameID>
39
39
  <samlp:SessionIndex>#{self.session_index}</samlp:SessionIndex>
@@ -20,8 +20,8 @@ module Onelogin::Saml
20
20
 
21
21
  def generate
22
22
  <<-XML
23
- <samlp:LogoutResponse xmlns:samlp="#{Onelogin::NAMESPACES['samlp']}" xmlns:saml="#{Onelogin::NAMESPACES['saml']}" ID="#{self.id}" Version="2.0" IssueInstant="#{self.issue_instant}" Destination="#{self.destination}" InResponseTo="#{self.in_response_to}">
24
- <saml:Issuer>#{self.issuer}</saml:Issuer>
23
+ <samlp:LogoutResponse xmlns:samlp="#{Onelogin::NAMESPACES['samlp']}" xmlns:saml="#{Onelogin::NAMESPACES['saml']}" ID="#{self.id}" Version="2.0" IssueInstant="#{self.issue_instant}" Destination="#{CGI.escapeHTML(self.destination)}" InResponseTo="#{self.in_response_to}">
24
+ <saml:Issuer>#{CGI.escapeHTML(self.issuer)}</saml:Issuer>
25
25
  <samlp:Status>
26
26
  <samlp:StatusCode Value="#{Onelogin::Saml::StatusCodes::SUCCESS_URI}"></samlp:StatusCode>
27
27
  <samlp:StatusMessage>#{STATUS_MESSAGE}</samlp:StatusMessage>
@@ -65,12 +65,12 @@ describe Onelogin::Saml::LogoutRequest do
65
65
  settings = Onelogin::Saml::Settings.new(
66
66
  :xmlsec_certificate => fixture_path("test1-cert.pem"),
67
67
  :xmlsec_privatekey => fixture_path("test1-key.pem"),
68
- :idp_slo_target_url => "http://idp.example.com/saml2?existing=param",
68
+ :idp_slo_target_url => "http://idp.example.com/saml2?existing=param&existing=param",
69
69
  :idp_cert_fingerprint => 'def18dbed547cdf3d52b627f41637c443045fe33',
70
70
  :name_identifier_format => Onelogin::Saml::NameIdentifiers::UNSPECIFIED
71
71
  )
72
72
  request = Onelogin::Saml::LogoutRequest.generate(name_qualifier, name_id, session_index, settings)
73
- expect(request.forward_url).to match(%r{^http://idp.example.com/saml2\?existing=param&})
73
+ expect(request.forward_url).to match(%r{^http://idp.example.com/saml2\?existing=param\&existing=param&})
74
74
  expect(verify_query_string_signature(settings, request.forward_url)).to be_true
75
75
  end
76
76
 
@@ -6,8 +6,8 @@ describe Onelogin::Saml::LogoutResponse do
6
6
  let(:id) { Onelogin::Saml::LogoutResponse.generate_unique_id(42) }
7
7
  let(:issue_instant) { Onelogin::Saml::LogoutResponse.get_timestamp }
8
8
  let(:in_response_to) { Onelogin::Saml::LogoutResponse.generate_unique_id(42) }
9
- let(:idp_slo_target_url) { 'http://idp.example.com/saml2' }
10
- let(:issuer) { 'http://idp.example.com/saml2' }
9
+ let(:idp_slo_target_url) { 'http://idp.example.com/saml2?existing=param&existing=param' }
10
+ let(:issuer) { 'http://idp.example.com/saml2?existing=param&existing=param' }
11
11
  let(:session) { {} }
12
12
 
13
13
  let(:settings) do
@@ -26,7 +26,7 @@ describe Onelogin::Saml::LogoutResponse do
26
26
 
27
27
  it "includes destination in the saml:LogoutRequest attributes" do
28
28
  value = xml.find_first('/samlp:LogoutResponse', Onelogin::NAMESPACES).attributes['Destination']
29
- expect(value).to eq "http://idp.example.com/saml2"
29
+ expect(value).to eq "http://idp.example.com/saml2?existing=param&existing=param"
30
30
  end
31
31
 
32
32
  it "includes id in the saml:LogoutRequest attributes" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-saml-mod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OneLogin LLC
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2014-11-06 00:00:00.000000000 Z
17
+ date: 2014-12-23 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: libxml-ruby