Project

General

Profile

Actions

Bug #14849

closed

extension manager doesn't report md5 checksum errors on uploaded extensions

Added by Simon Groenewolt over 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-07-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The extension manager code reports an

Error: No extension key!!! Why? - nobody knows... (Or no files in the file-array...)

instead of

Wrong file format. No data recognized.

if the uploaded t3x file has become corrupted in some way.

The 'decodeExchangeData' method in /typo3/mod/tools/em/index.php supports error reporting by either returning an array (no errors) or a string (error!).
In the latter case the content of the string is the error message - this error message should probably be forwarded to the user. The code checks if the $fetchData is an array, but since this is an array wrapped around the result of decodeExchangeData (why?) it always returns true!

Fixing this is easy:

current code (line 1039):

// Decode file data:
$fetchData = array($this->decodeExchangeData($fileContent),'');
if (is_array($fetchData)) {

To fix the check replace the last line by:

if (is_array($fetchData[0])) {

Bonus:

replace the line (around 1054):

} else return 'Wrong file format. No data recognized.';

by:

} else return 'Wrong file format. No data recognized. ('.$fetchData[0].')';

So the user gets to see the actual error message :-)
(issue imported from #M1263)

No data to display

Actions

Also available in: Atom PDF