Bug #14849
closedextension manager doesn't report md5 checksum errors on uploaded extensions
0%
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