carrierwaveuploader / carrierwave

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
https://github.com/carrierwaveuploader/carrierwave
8.78k stars 1.66k forks source link

Better error message for restrictive imagemagick security policies #2657

Closed TomK32 closed 1 year ago

TomK32 commented 1 year ago

I stumbled across this problem when I moved the development on my local machine into a docker container and the original error message pushing the blame on my PDF wasn't helpful at all. I do understand the change a few years ago to not show any details from the original error message, but this was painful. https://github.com/carrierwaveuploader/carrierwave/commit/7af7db3636f79a811e0f4f5da32de50042994493

Some info about the imagemagick security policy can be found here https://imagemagick.org/script/security-policy.php and in this blogpost https://alexvanderbist.com/2018/fixing-imagick-error-unauthorized/

The error message I added will point anyone into the right direction. I had a bit of a trouble with the test, hope it is good enough

mshibuya commented 1 year ago

Stale, please let me know on update.