pepyatka / pepyatka-server

Server for Pepyatka
79 stars 27 forks source link

[attachments] Send error details when there's "Corrupt image" #295

Closed clbn closed 9 years ago

clbn commented 9 years ago

When GraphicsMagick cannot parse an image (excuses vary) there's error like this:

gm identify: Corrupt image (/tmp/upload_3d35e6942v8e2e612e2fe5aeaea08bcv).
gm identify: Request did not return an image.

I want to provide client some information on what's happened, but I don't want to expose the whole text of any error (due to security reasons).