Review main Merged

65963[BUGFIX] Assume image dimension of SVGs with no dimension

Helmut Hummel CR +2 V +2 Easy +14 −2 updated 11/17/20, 14:37

Commit message

Extracting SVG processing to its own processor did not
respect that previously SVG files without dimensions were
handled as a side effect of undefined behaviour without
causing hard errors. The new processor however throws
an exception instead of accepting undefined behaviour, which
causes old installations with such SVG files to break.

As a mitigation (as long as no other correct behaviour is defined),
some default image dimensions are assumed for SVG files where
none can be properly determined.

This does not make SVG files without defined dimensions properly work,
but at least restores the previous behaviour of not throwing
an exception.

Additionally extracting SVG processing uncovered another bug
that existed, but never fully surfaced before.

Processed files that were updated, but in fact were using the
original file (like SVGs typically do) accessed the wrong storage
to fetch file infos, when the processed files were configured to
remain of a different storage. This is now properly checked as well.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Timo Poppinga +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Timo Poppinga +1
    • TYPO3com +1 CI

Issues 3

Files 3

Review log 810

  1. Helmut Hummel uploaded patch set 1 09/30/20, 11:18

  2. Jörn Wagner commented on patch set 1 09/30/20, 11:32

    SvgImageProcessor.php:49

    Why 64x64? Why not 1x1? That would be a bit more obvious to be a specially handled case than 64 pixels squared and it would still be "more than 0".
  3. TYPO3com voted on patch set 1 V +1 09/30/20, 11:37 Completed build in 19m 10s on Wed, 30 Sep, 11:37 AM Test Summary: 73690 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6091

  4. Helmut Hummel uploaded patch set 2 09/30/20, 11:58

  5. TYPO3com voted on patch set 2 V +1 09/30/20, 12:15 Completed build in 17m 00s on Wed, 30 Sep, 12:15 PM Test Summary: 73690 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6096

  6. Helmut Hummel commented on patch set 2 10/16/20, 11:18

    SvgImageProcessor.php:49 Reply Unresolved

    This mimics thumbnail preview for the backend, which worked previously for svg files without dimensions
  7. Timo Poppinga voted on patch set 2 V +1 CR +1 10/16/20, 11:23

  8. Helmut Hummel wrote 10/16/20, 11:40

    Topic set to image-processing
  9. Georg Ringer voted on patch set 2 V +2 CR +2 11/17/20, 14:37

  10. Georg Ringer merged patch set 3 11/17/20, 14:37