saml2 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml2/key.rb +3 -2
- data/lib/saml2/version.rb +1 -1
- data/spec/lib/key_spec.rb +11 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f19cbd0c6dfd04619a0124fd9416a285914bfbfcf4108551dc50c38a885fc9e
|
4
|
+
data.tar.gz: d48b64ee7a14d2ac6d581045acc1c18ed93205d8ea6f28db72deb84509036254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ae9e53321ea87e73f2d640fdce663c24a5a0fdb9995c42a702b96af409fe2f318cb62f152f6585a298d8bb985254e49a076744e22daaa6f1b6ec5d68589e8a8
|
7
|
+
data.tar.gz: 9cc452f3831f1f1cb37f3b467e6d980ba2e683c11356c653706094f4b28e7fe65b613115c6c4dc32b42c67e513e09d45272b976b268b6bcb13280f18e47e9005
|
data/lib/saml2/key.rb
CHANGED
@@ -31,11 +31,12 @@ module SAML2
|
|
31
31
|
@certificate ||= OpenSSL::X509::Certificate.new(Base64.decode64(x509))
|
32
32
|
end
|
33
33
|
|
34
|
-
# Formats a fingerprint as all lowercase, with a : every two characters
|
34
|
+
# Formats a fingerprint as all lowercase, with a : every two characters,
|
35
|
+
# stripping all non-hexadecimal characters.
|
35
36
|
# @param fingerprint [String]
|
36
37
|
# @return [String]
|
37
38
|
def self.format_fingerprint(fingerprint)
|
38
|
-
fingerprint.downcase.gsub(/(\h{2})(?=\h)/, '\1:')
|
39
|
+
fingerprint.downcase.gsub(/[^0-9a-f]/, '').gsub(/(\h{2})(?=\h)/, '\1:')
|
39
40
|
end
|
40
41
|
|
41
42
|
# @return [String]
|
data/lib/saml2/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
module SAML2
|
4
|
+
describe KeyInfo do
|
5
|
+
describe '.format_fingerprint' do
|
6
|
+
it 'strips non-hexadecimal characters' do
|
7
|
+
expect(KeyInfo.format_fingerprint("\u200F abcdefghijklmnop 1234567890-\n a1")).to eq("ab:cd:ef:12:34:56:78:90:a1")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
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: 3.0.
|
4
|
+
version: 3.0.1
|
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-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -212,6 +212,7 @@ files:
|
|
212
212
|
- spec/lib/entity_spec.rb
|
213
213
|
- spec/lib/identity_provider_spec.rb
|
214
214
|
- spec/lib/indexed_object_spec.rb
|
215
|
+
- spec/lib/key_spec.rb
|
215
216
|
- spec/lib/logout_request_spec.rb
|
216
217
|
- spec/lib/logout_response_spec.rb
|
217
218
|
- spec/lib/message_spec.rb
|
@@ -249,6 +250,7 @@ test_files:
|
|
249
250
|
- spec/lib/attribute_spec.rb
|
250
251
|
- spec/lib/entity_spec.rb
|
251
252
|
- spec/lib/attribute_consuming_service_spec.rb
|
253
|
+
- spec/lib/key_spec.rb
|
252
254
|
- spec/lib/message_spec.rb
|
253
255
|
- spec/lib/response_spec.rb
|
254
256
|
- spec/lib/logout_request_spec.rb
|