-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
Remove ruby 2.4+ warnings #458
Conversation
lib/onelogin/ruby-saml/response.rb
Outdated
@@ -288,7 +289,7 @@ def issuers | |||
raise ValidationError.new(error_msg) | |||
end | |||
|
|||
doc = decrypted_document.nil? ? document : decrypted_document | |||
_doc = decrypted_document.nil? ? document : decrypted_document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this line? It seems not required.
lib/onelogin/ruby-saml/utils.rb
Outdated
@@ -32,7 +32,9 @@ def self.format_cert(cert) | |||
formatted_cert.join("\n") | |||
else | |||
cert = cert.gsub(/\-{5}\s?(BEGIN|END) CERTIFICATE\s?\-{5}/, "") | |||
cert = cert.gsub(/[\n\r\s]/, "") | |||
cert = cert.gsub(/[\r]/, "") | |||
cert = cert.gsub(/\n/, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/\n/ or /[\n]/ ?
/\s/ or /[\s]/ ?
lib/xml_security.rb
Outdated
@@ -318,10 +318,10 @@ def validate_signature(base64_cert, soft = true) | |||
|
|||
# check digests | |||
ref = REXML::XPath.first(sig_element, "//ds:Reference", {"ds"=>DSIG}) | |||
uri = ref.attributes.get_attribute("URI").value | |||
_uri = ref.attributes.get_attribute("URI").value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this line as well?
I commit the fix. Should I squash it into one commit? |
I think we are ok |
I do some code refactor in order to remove warnings about unused variables, inner scoped variables with same name of outer scope and a missing initialization of
@logger
instance attribute inside Logger. I don't change any code behaviour.