Review main Merged

69225[BUGFIX] Fix extension upload form

Oli Bartsch CR +2 V +2 Easy +32 −4 updated 05/21/21, 11:29

Commit message

Submitting the extension upload form in the
extension manager module, without adding
an extension file, previously triggered an
exception.

Actually those exceptions should have been
caught in the corresponding action and
transformed into a flash message. This
however did not happen because the catch
block calls a method, which again throws an
exception, in case no or an invalid file(name)
is given.

To fix this, a dedicated Exception is now being
thrown when checking the file in checkFileName().
This is the first and most important check and
should therefore be handled independently.
This means, no further code, especially when
relying on the submitted file, should be executed
when this exception was caught.

As an UX improvement, the "required" attribute
is added to the file input field, preventing unintended
submitting of the form before an extension file was
added.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Daniel Goerz +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Daniel Goerz +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 56

  1. Oli Bartsch uploaded patch set 1 05/20/21, 22:51

  2. core-ci voted on patch set 1 V +1 05/20/21, 23:00 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11756

  3. Daniel Goerz voted on patch set 1 V +1 CR +1 05/21/21, 08:29

  4. Benni Mack voted on patch set 1 V +1 CR +1 05/21/21, 10:15

  5. Oli Bartsch voted on patch set 1 V +2 CR +2 05/21/21, 11:29

  6. Oli Bartsch merged patch set 2 05/21/21, 11:29