Bug #84791

EXT:backend: missing file existence check for backend logo

Added by Lidia Demin about 1 year ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2018-04-19
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Problem:
If the file given in backendLogo field of EXT:backend is invalid, an exception is thrown:

#1476107295: PHP Warning: getimagesize(/.../typo3conf/ext/bvm_sitepackage/Resources/Public/image/backend-logo.png): failed to open stream: No such file or directory in /.../vendor/typo3/cms/typo3/sysext/core/Classes/Type/File/ImageInfo.php line 58 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/.../vendor/typo3/cms/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 107.

The backend is not accessible any more.

Cause:
Such a check is missing in TYPO3\CMS\Backend\Controller::renderTopbar() [L: 405] although it's described in the comment:

 // if no custom logo was set or the path is invalid, use the original one
if (empty($logoPath)) {

This results in the invalid file path being called instead of using the default file.

ext-backend-logo-field.png View (13.9 KB) Lidia Demin, 2018-04-19 10:28

Associated revisions

Revision 8146446c (diff)
Added by Lidia Demin about 1 year ago

[BUGFIX] Check if file exists for backend logo

If an invalid file path is given, an exception is thrown if trying to
access its properties and the backend is not accessible any more.
Check if file exists before accessing. If not use default.

Resolves #84791
Releases: master, 8.7

Change-Id: Ide4c58dd03cbad1ed06ad66f558d170cd2170482
Reviewed-on: https://review.typo3.org/56731
Tested-by: TYPO3com <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Kay Strobach <>
Tested-by: Kay Strobach <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision ea3d1294 (diff)
Added by Lidia Demin about 1 year ago

[BUGFIX] Check if file exists for backend logo

If an invalid file path is given, an exception is thrown if trying to
access its properties and the backend is not accessible any more.
Check if file exists before accessing. If not use default.

Resolves #84791
Releases: master, 8.7

Change-Id: Ide4c58dd03cbad1ed06ad66f558d170cd2170482
Reviewed-on: https://review.typo3.org/56748
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Dan Untenzu about 1 year ago

The backend is not accessible any more.

Problem is, that this value is set in EXT:backend via extension manager and then stored as serialized array in LocalConfiguration.php. If we set a wrong value, the backend is not useable anymore and there is no way to fix this then removing the configuration for EXT:backend in LocalConfiguration.php by hand.

#2 Updated by Lidia Demin about 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF