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

Deprecation confusion concerning 'whitelist/blacklist' #2555

Open
rbr opened this issue Mar 29, 2021 · 2 comments
Open

Deprecation confusion concerning 'whitelist/blacklist' #2555

rbr opened this issue Mar 29, 2021 · 2 comments

Comments

@rbr
Copy link

rbr commented Mar 29, 2021

Due to the mimemagic incident we were forced to quickly update carrierwave and were thus confronted with the whitelist/blacklist deprecation change from 2.2.
However the way the deprecation is implemented with respond_to? only works as a deprecation if you were already using the white/blacklist methods directly in your application. This doesn't work as a deprecation if another gem is depending on the existence of those methods.

We are using carrierwave_direct which still uses those old methods while certain models within our application aren't defining any whitelists resulting in undefined method 'extension_whitelist' errors. It took me a while to figure out the problem as the change is marked as a deprecation.

The quickfix/solution for us for now was putting in empty methods on our models that include CarrierWaveDirect::Uploader so that the respond_to is satisfied and we can make use of the deprecation-functionality;

  def extension_whitelist
  end

I'm posting this as some feedback towards the change and to help others understand the problem as I assume we're not the only ones forced to suddenly update gems due to the mimemagic incident.

@bastianwegge
Copy link

Hello @rbr, since the opening of your ticket, a new release has been created, as you can see here: https://github.com/carrierwaveuploader/carrierwave/releases/tag/v2.2.1

Can you try to switch from master to this release and see if this fixes your problem?

@rbr
Copy link
Author

rbr commented Mar 31, 2021

Hi @bastianwegge, the issue I raised concerns the whitelist/blacklist deprecation from 2.2, which hasn't been changed since then, so this new release does not change anything in regard to this issue. I'll change my initial message a bit to remove some irrelevant info to avoid this confusion.

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