We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec7b4ca commit c8c1b5eCopy full SHA for c8c1b5e
lib/onelogin/ruby-saml/utils.rb
@@ -32,7 +32,7 @@ def self.format_cert(cert)
32
formatted_cert.join("\n")
33
else
34
cert = cert.gsub(/\-{5}\s?(BEGIN|END) CERTIFICATE\s?\-{5}/, "")
35
- cert = cert.gsub(/[\r]/, "")
+ cert = cert.gsub(/\r/, "")
36
cert = cert.gsub(/\n/, "")
37
cert = cert.gsub(/\s/, "")
38
cert = cert.scan(/.{1,64}/)
@@ -53,9 +53,9 @@ def self.format_private_key(key)
53
# is this an rsa key?
54
rsa_key = key.match("RSA PRIVATE KEY")
55
key = key.gsub(/\-{5}\s?(BEGIN|END)( RSA)? PRIVATE KEY\s?\-{5}/, "")
56
- key = key.gsub(/[\n]/, "")
57
- key = key.gsub(/[\r]/, "")
58
- key = key.gsub(/[\s]/, "")
+ key = key.gsub(/\n/, "")
+ key = key.gsub(/\r/, "")
+ key = key.gsub(/\s/, "")
59
key = key.scan(/.{1,64}/)
60
key = key.join("\n")
61
key_label = rsa_key ? "RSA PRIVATE KEY" : "PRIVATE KEY"
0 commit comments