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

[READY] v2.x - Small cleanups #737

Open
wants to merge 2 commits into
base: v2.x
Choose a base branch
from

Conversation

johnnyshields
Copy link
Collaborator

@johnnyshields johnnyshields commented Jan 11, 2025

This is mostly syntax cleanup, but there is one bugfix re: IdpMetadataParser--currently the #fingerprint method memoizes its result, and it should not b/c it takes arguments.

@@ -157,7 +159,7 @@ def inflate(deflated)
# @return [String] The deflated string
#
def deflate(inflated)
Zlib::Deflate.deflate(inflated, 9)[2..-5]
Zlib::Deflate.deflate(inflated, Zlib::BEST_COMPRESSION)[2..-5]
Copy link
Collaborator Author

@johnnyshields johnnyshields Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zlib::BEST_COMPRESSION == 9

def fingerprint(certificate, fingerprint_algorithm = RubySaml::XML::Document::SHA256)
@fingerprint ||= begin
return unless certificate
def fingerprint(certificate, fingerprint_algorithm = RubySaml::XML::Crypto::SHA256)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method takes arguments so it can't be memoized (can't do @fingerprint ||= ... here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant