Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECT-1384 Canonicalize Fix #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/saml_idp/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding: utf-8
module SamlIdp
VERSION = '0.11.1'
VERSION = '0.11.2'
end
2 changes: 0 additions & 2 deletions lib/saml_idp/xml_security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ def extract_inclusive_namespaces
if element = REXML::XPath.first(self, "//ec:InclusiveNamespaces", { "ec" => C14N })
prefix_list = element.attributes.get_attribute("PrefixList").value
prefix_list.split(" ")
else
[]
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
config.include SamlRequestMacros
config.include SecurityHelpers

SamlIdp.request_config = SamlIdp::Configurator.new

config.before do
SamlIdp.request_config = SamlIdp::Configurator.new
SamlIdp.configure do |c|
c.attributes = {
emailAddress: {
Expand All @@ -48,6 +47,7 @@

# To reset to default config
config.after do
SamlIdp.request_config = SamlIdp::Configurator.new
SamlIdp.instance_variable_set(:@config, nil)
SamlIdp.configure do |c|
c.attributes = {
Expand Down
4 changes: 2 additions & 2 deletions spec/xml_security_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ module SamlIdp
expect(inclusive_namespaces).to eq %w[#default saml ds xs xsi]
end

it "return an empty list when inclusive namespace element is missing" do
it "return nil when inclusive namespace element is missing" do
response = fixture(:no_signature_ns, false)
response.slice! %r{<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="#default saml ds xs xsi"/>}

document = XMLSecurity::SignedDocument.new(response)
inclusive_namespaces = document.send(:extract_inclusive_namespaces)

expect(inclusive_namespaces).to be_empty
expect(inclusive_namespaces).to be_nil
end
end

Expand Down