Skip to content

Conversation

@ehelms
Copy link
Contributor

@ehelms ehelms commented Feb 4, 2025

Rails applications can override the digest class through configuration settings. Further, Rails does this by default in versions suchs as 7 where it defaults to SHA256. Using ActiveSupport::Digest directly skips over this setting causing it to always be MD5 in the current state. This breaks in modern environments MD5 is disabled such as FIPS environments.

Copy link

@jameerpathan111 jameerpathan111 left a comment

Choose a reason for hiding this comment

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

Tested the patch with satellite installation on fips-enabled system, it fixes the issue.

@ehelms
Copy link
Contributor Author

ehelms commented Feb 7, 2025

@mathieujobin Could you take a look when you get a chance, and if you merge the change a follow up release would be greatly appreciated.

Additional context is available in our project's tracker -- https://projects.theforeman.org/issues/38118

Copy link
Collaborator

@mathieujobin mathieujobin left a comment

Choose a reason for hiding this comment

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

I will merge if tests passes...

If you have time to add newer rubies and rails versions to the build matrix before me ..

That'd be great 👍

Thanks for your contribution

@ehelms
Copy link
Contributor Author

ehelms commented Feb 10, 2025

The tests are unrelated to this change, I have opened a PR to fix them separately -- #174

Rails applications can override the digest class through
configuration settings. Further, Rails does this by default in
versions suchs as 7 where it defaults to SHA256. Using
ActiveSupport::Digest directly skips over this setting causing
it to always be MD5 in the current state. This breaks in modern
environments MD5 is disabled such as FIPS environments.

Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
@ehelms
Copy link
Contributor Author

ehelms commented Feb 24, 2025

@mathieujobin Can you take another look?

@mathieujobin mathieujobin merged commit da9ed97 into pitr:master Feb 24, 2025
21 checks passed
@mathieujobin
Copy link
Collaborator

I will try to release it tomorrow or in the following days, ping me again if I forget

@ehelms
Copy link
Contributor Author

ehelms commented Feb 24, 2025

Awesome, thank you so much!

@evgeni
Copy link

evgeni commented Feb 27, 2025

@mathieujobin friendly ping ;-)

@mathieujobin
Copy link
Collaborator

Sorry for the wait ! enjoy your weekend

Successfully registered gem: angular-rails-templates (1.3.1)

is out in the wild

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.

5 participants