Skip to content

V2.x improvements#777

Merged
pitbulk merged 7 commits intov2.xfrom
v2.x_improvements
Nov 22, 2025
Merged

V2.x improvements#777
pitbulk merged 7 commits intov2.xfrom
v2.x_improvements

Conversation

@pitbulk
Copy link
Copy Markdown
Collaborator

@pitbulk pitbulk commented Nov 21, 2025

Fix several typos on the documentation and code

Add to the README how to force SP-Initiate flow and Prevent Reply Attacks

Adjust OneLogin namespace compatibility, defining Module instead of Alias to Object.

OneLogin = Object

This alias was very broad: it makes every constant under Object appear as if it lived under OneLogin::. For example:

OneLogin::String => ::String
OneLogin::Time => ::Time

and could hide bugs or conflict with apps that already define OneLogin.

Fix compatibility with Logging

Old code called OneLogin::RubySaml::Logging.logger = ....
New code expects RubySaml::Logging.logger = ....

The compat alias OneLogin = Object does not expose Logging under OneLogin::RubySaml

OneLogin::RubySaml::Logging.logger = my_logger

will now raise NameError instead of continuing to work.

This is a backwards‑compat break.

Adjust regular expression for base64_encoded? to avoid 'character class has duplicated range' warning

lib/ruby_saml/xml/decoder.rb:64: warning: character class has duplicated range: /[\s\r\n]|\\r|\\n/

Improve the inflate method. Prevent potential DoS vulnerability in Zlib::Inflate by limiting the maximum decompressed size. The data is now inflated in chunks.

@pitbulk pitbulk changed the base branch from master to v2.x November 21, 2025 10:31
@johnnyshields
Copy link
Copy Markdown
Collaborator

@pitbulk these changes look fine to me.

lib/ruby_saml.rb Outdated
Logging = ::RubySaml::Logging
end
end
end No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Run rubocop -A to fix indents

@pitbulk pitbulk merged commit 1efc933 into v2.x Nov 22, 2025
46 of 56 checks passed
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.

2 participants