Project

General

Profile

Actions

Bug #78306

closed

Extension list import omits some data

Added by Michael Schams over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Extension Manager
Target version:
Start date:
2016-10-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Summary

On the import of extensionlist.xml.gz from ter.typo3.org, TYPO3 CMS does not process all details in field uploadcomment due to a HTML-encoded character (#13;). As a result, the upload comment provided by extension authors is incompletely shown in the Extension Manager in TYPO3 instances. This is the case for several extensions (see examples below).

Description

Extension authors can (should) enter a comment, when they upload/publish an extension (or a new version of an extension) to the TYPO3 Extension Repository . The TER features such an upload function and allows authors to enter the upload comment in a textarea. Line breaks can be entered by using <RETURN> (one or more). These line breaks are converted into the HTML-encoded character #13; in the extension list, which is for example downloaded by TYPO3 instances via the Extension Manager.

The Extension Manager stores the extension list in a sub-folder of typo3temp/, extracts and parses the XML file and saves the data into the local database (table: tx_extensionmanager_domain_model_extension). However the parser function treats the character #13; as a separator and only stores the string after the last occurrence of #13; to the database.

As a consequence, the following data in file extensionlist.xml.gz...

...
<uploadcomment>Official AWS SDK for PHP version 3.19.11 with updates and bugfixes for AwsCloudFormation and AwsS3.&#13;
https://github.com/aws/aws-sdk-php/releases/tag/3.19.11</uploadcomment>
...

...results in the fact, that only the last line (in this case the link to github.com) is shown in the TYPO3 instance.

Screenshots

Attached screenshot0001.png shows an extract of file extensionlist.xml.gz
Attached screenshot0002.png shows an example of the EM, function "show all versions of ...".
Attached screenshot0003.png shows an example of the EM, dialog when updating an extension.

Impact

The character #13; occurs more than 9000 times in file extensions.xml.gz as of Oct/2016. The XML file has a total of approx. 700,000 lines.

# zegrep "&#[0-9]*;" 1.extensions.xml.gz 

Several TYPO3 CMS extensions are affected. Some of them are: a21glossary, aahbook, ab_linklist, constant_editor, ke_yac, aws_sdk_php, captcha, find_and_replace, html5_readykit, lpc_sermons, etc.

Possible Solutions

Basically I see at least three options how to fix this problem:

1. Make sure, extensionlist.xml.gz does not contain this character in the first place (or escape it properly)
2. Let the XML Parser function treat the character as a separator, but join all elements together rather than overwriting existing elements
3. Remove the character in question before the XML file gets parsed and the data imported

Affected file for solutions 2 and 3 is: typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPushParser.php.

Reproducibility

The issue is reproducible: yes
Tested in TYPO3 CMS version 7.6.11 with PHP version 5.6.26 (standard Debian Jessie environment)
Tested in TYPO3 CMS version 8.3.1 with PHP version 7.0.x

Additional Notes

Thanks to Daniel Sun for investigating the issue.


Files

screenshot0001.png (160 KB) screenshot0001.png Michael Schams, 2016-10-16 08:13
screenshot0002.png (101 KB) screenshot0002.png Michael Schams, 2016-10-16 08:13
screenshot0003.png (64.9 KB) screenshot0003.png Michael Schams, 2016-10-16 08:13
issue-78306-a.diff (1.13 KB) issue-78306-a.diff Michael Schams, 2016-10-16 08:19
issue-78306-b.diff (912 Bytes) issue-78306-b.diff Michael Schams, 2016-10-16 08:19

Updated by Michael Schams over 7 years ago

Attached patch issue-78306-a.diff is a suggestion how the issue could be fixed by using solution 2.
Attached patch issue-78306-b.diff is a suggestion how the issue could be fixed by using solution 3.

I am happy to create a proper review ticket once one of the solutions is accepted :-)

Actions #2

Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50516

Actions #3

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50516

Actions #4

Updated by Markus Klein over 7 years ago

  • Assignee set to Markus Klein
  • Priority changed from Should have to Must have
  • Target version set to next-patchlevel
  • Sprint Focus set to Stabilization Sprint
Actions #5

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50516

Actions #6

Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50516

Actions #7

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50627

Actions #8

Updated by Markus Klein over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF