getkirby-v2 / panel

This is the deprecated admin panel for Kirby v2.
http://getkirby.com
Other
133 stars 71 forks source link

Invalid jpg image causes Panel crash: Upgrade SimpleImage #1122

Closed texnixe closed 3 years ago

texnixe commented 6 years ago

https://forum.getkirby.com/t/invalid-jpeg-marker-causes-panel-to-crash/9072

lukasbestle commented 6 years ago

Needs an example file for debugging.

anteante commented 6 years ago

@lukasbestle here are a couple of files that caused a crash of the panel in my system: archiv.zip

lukasbestle commented 6 years ago

Thank you for the super quick reply. However I can't get the Panel to crash with any of those images. Could you please tell me exactly which steps were needed to reproduce this?

anteante commented 6 years ago

Sure, no problem. The steps: Whenever I add these files to a specific sub section of the page, the panel crashes. It does not matter if I upload the files via the panel, or add them to the folder in the file system.

I can send you a zip archive of the project if that helps. Just let me know where I should send it to.

lukasbestle commented 6 years ago

I'm not sure that I will be able to reproduce this in your project if I can't reproduce this in the starterkit, but we should at least try that. :)

Please send the files to lukas at <Kirby's domain> (removed for spam protection). Thanks in advance!

anteante commented 6 years ago

As a matter of fact, I can reproduce it in the starterkit – to some degree. When I add the three files mentioned to a project folder, the breadcrumb navigation in the panel changes to 'Dashboard > Error' – it's not quite a total crash as I am experiencing it in my particular project, but something seems to be dodgy.

lukasbestle commented 6 years ago

As I said, I can't reproduce this in the starterkit. Could you please send me your project?

lukasbestle commented 6 years ago

I have received the files from @anteante and will look into this issue for 2.5.9.

lukasbestle commented 6 years ago

I couldn't reproduce the issue but have updated the SimpleImage library. The new version contains a fix that should at least fail gracefully and not completely break the Panel.

lukasbestle commented 6 years ago

I had to revert the SimpleImage upgrade for now to restore compatibility with plugins. A breaking change like this can't be in a patch release.

We will upgrade our vendor dependencies with Kirby 3.

eighthday commented 6 years ago

I have the same exact problem, tried 2.5.9 - RC1 to no avail. Certain images just crash the panel, with no error message. While we accept the image is the issue (although opens fine in photoshop, can be uploaded to other cms etc..) the client can not recover the page. The only way to fix is to delete the image via sftp and the page options come back. We just need an error message and the panel to reject the image.

lukasbestle commented 6 years ago

As I wrote, I had to revert the change that introduced the error message because of compatibility issues.

What you could try is to switch to ImageMagick as your thumb driver. Maybe those "broken" images are accepted by ImageMagick while not being accepted by GDLib.