-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
getPreview on a broken image shouldn't crash #7276
Comments
cc @rullzer |
Is this still a thing? |
yeah it is. But I would need a broken jpg to test with |
Hi @rullzer The bug is still present. Come here for this report. matiasdelellis/facerecognition#295
MMM.. The main problem is that Nexcloud trusts the extensions very much. if the file has So, here an example: https://delellis.com.ar/s/x7yw66odGqPCKwF It is just an mp4 with jpg extension.. |
I am experiencing the same issues. For example if a file with a .jpg extension is actually a html file it will generate this same problem. |
You don't need an MP4 file or a corrupted picture to trigger this. Just create an empty file and stick |
This comment was marked as off-topic.
This comment was marked as off-topic.
Broken images as well as image with the wrong extension (ex webp image with a .jpg ext) are the issues here. |
issue is back on NC 29 RC3. I never had this issue on NC28
|
When trying to obtain a preview from a broken image file, nextcloud 12 currently crashes:
(Tested with a .jpg file containing only null characters. Preview generation was triggered by the preview generator app.)
exif_imagetype($imagePath)
fails determining the image type. The following file-type switch statement falls back to the default case and fails because Filesystem isn't configured:My workaround for this is:
... which certainly isn't the optimal solution. (I don't know if the file contents are useful at all in this case.) But at least it doesn't crash.
The text was updated successfully, but these errors were encountered: