]> source.dussan.org Git - nextcloud-server.git/commit
fix(previews): Don't crash on animated WEBP images 47080/head
authorJosh Richards <josh.t.richards@gmail.com>
Thu, 18 May 2023 17:27:13 +0000 (13:27 -0400)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 6 Aug 2024 16:09:24 +0000 (16:09 +0000)
commit32dd57e27215eb968942c243a82b456ab6846a82
treefca54ca912d772dff71c0024459a63d85de84e5a
parent873537577e5bab6fc2787f823115d97644b43222
fix(previews): Don't crash on animated WEBP images

Fixes #30029 and #37263

libgd handles animated WEBP images poorly and generates a meaningless error message as a result. We were returning a 500 error for these preview requests (web) and a fatal error at the command-line (occ). Now we bypass libgd if the we detect an animated WEBP image (and simply don't generate the preview). No more 500 error. Should fix occ too.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
lib/private/legacy/OC_Image.php