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

default hash algorithm changed in rails7 #28

Open
nov opened this issue Feb 22, 2023 · 2 comments
Open

default hash algorithm changed in rails7 #28

nov opened this issue Feb 22, 2023 · 2 comments

Comments

@nov
Copy link

nov commented Feb 22, 2023

The default hash algorithm used in ActiveSupport::KeyGenerator changed from SHA1 to SHA256.

It affects ActiveRecordEncryption::Encryptor::ActiveSupport and causes ActiveSupport::MessageVerifier::InvalidSignature when accessing to an attribute encrypted using SHA1.

@nov
Copy link
Author

nov commented Feb 22, 2023

ps.
in our current app, key_generator uses SHA1 on the first load.
and once the app is reloaded (on development env), it changes the hash algorithm to SHA256.

@alpaca-tc
Copy link
Owner

@nov Sorry for the delay in replying.
If you have already fix this issue in your application, could you please send a PR?

Repository owner deleted a comment from katsavav Feb 5, 2024
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

No branches or pull requests

2 participants