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.