spree / deface

Rails plugin that allows you to customize ERB views in a Rails application without editing the underlying view.
MIT License
520 stars 127 forks source link

Support for configurable hash digest algorithm #180

Closed dmitri-d closed 6 years ago

dmitri-d commented 6 years ago

Relies on ActiveSupport::Digest class introduced in Rails 5.2. This is useful when running in FIPS-compatible environments where MD5 hash isn't available.

Please note I left Deface::OriginalValidator#validate_original as is, as by default ActiveSupport::Digest is configured to use MD5, which may not be sufficient in this case.

dmitri-d commented 6 years ago

Any chance this can be reviewed?

dmitri-d commented 6 years ago

Pretty please?

bbonislawski commented 6 years ago

Hello @witlessbird .

Thanks for your contribution.

What do you think about writing some specs for your code?

dmitri-d commented 6 years ago
bbonislawski commented 6 years ago

Thanks @witlessbird . I'm merging this now and we'll release new version of deface with this code.

iNecas commented 6 years ago

When testing, I've noticed an issue with ..., similarly as in https://github.com/rails/rails/commit/b9e7c676ca13e286a371dc1b4996d2c15c0461e8. Correcting PR opened here https://github.com/spree/deface/pull/183