69099[TASK] Show image of distribution even if not installed
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Anja Leichsenring +1
- Christian Kuhn +1
- Thomas Löffler +1
-
Verified V +2 Done
- Oli Bartsch +2
- Anja Leichsenring +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 16
- Build/Sources/Sass/module/_extensionmanager.scss+6 −6
- Build/Sources/TypeScript/extensionmanager/Resources/Public/TypeScript/DistributionImage.tsnew+81 −0
- typo3/sysext/backend/Resources/Public/Css/backend.css+1 −1
- typo3/sysext/extensionmanager/Classes/Controller/DistributionController.php+6 −8
- typo3/sysext/extensionmanager/Classes/Controller/ListController.php+1 −0
- typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php8+21 −0
- typo3/sysext/extensionmanager/Classes/Domain/Repository/BulkExtensionRepositoryWriter.php+3 −1
- typo3/sysext/extensionmanager/Classes/Parser/ExtensionXmlParser.php+15 −1
- typo3/sysext/extensionmanager/Classes/ViewHelpers/DistributionImageViewHelper.phpdeleted+0 −116
- typo3/sysext/extensionmanager/Configuration/TCA/tx_extensionmanager_domain_model_extension.php+7 −1
- typo3/sysext/extensionmanager/Resources/Private/Language/locallang_db.xlf+3 −0
- typo3/sysext/extensionmanager/Resources/Private/Partials/List/Distribution.html2+6 −2
- typo3/sysext/extensionmanager/Resources/Private/Templates/Distribution/Show.html3+5 −1
- typo3/sysext/extensionmanager/Resources/Public/JavaScript/DistributionImage.jsnew+13 −0
- typo3/sysext/extensionmanager/Tests/Unit/Domain/Model/ExtensionTest.php+16 −0
- typo3/sysext/extensionmanager/ext_tables.sql4+1 −0
Review log 5376
Show 3451 earlier messages
-
Thomas Löffler uploaded patch set 1 05/10/21, 14:08
-
core-ci voted on patch set 1 V +1 05/10/21, 14:20 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11347
-
Thomas Löffler uploaded patch set 2 05/10/21, 16:30
-
Thomas Löffler updated the commit message in patch set 3 05/10/21, 16:31
-
core-ci voted on patch set 2 V +1 05/10/21, 16:42 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11352
-
core-ci voted on patch set 3 V +1 05/10/21, 16:45 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11353
-
Thomas Löffler uploaded patch set 4 05/15/21, 19:42
-
core-ci voted on patch set 4 V +1 05/15/21, 19:52 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11547
-
Thomas Löffler updated the commit message in patch set 5 05/15/21, 21:15
-
core-ci voted on patch set 5 V +1 05/15/21, 21:24 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11557
-
Thomas Löffler updated the commit message in patch set 6 05/16/21, 10:38
-
core-ci voted on patch set 6 V +1 05/16/21, 10:49 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11562
-
Oli Bartsch commented on patch set 6 05/16/21, 16:03
AbstractExtensionXmlParser.php:251Let's name this "distributionImageUrl" here as well.AbstractExtensionXmlParser.php:276Let's name this "distributionImageUrl" here as well.ExtensionXmlPushParser.php:261Let's name this "distributionImageUrl" here as well. -
Thomas Löffler uploaded patch set 7 05/17/21, 06:01
-
core-ci voted on patch set 7 V +1 05/17/21, 06:10 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11570
-
Thomas Löffler uploaded patch set 8 05/17/21, 06:12
-
core-ci voted on patch set 8 V +1 05/17/21, 06:22 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11571
-
Thomas Löffler uploaded patch set 9 05/17/21, 07:32
-
Thomas Löffler commented on patch set 9 05/17/21, 07:34
Extension.php:706ReplyDoneAbstractExtensionXmlParser.php:251ReplyDoneAbstractExtensionXmlParser.php:276ReplyDoneExtensionXmlPushParser.php:261ReplyThat needs to be changed in TER first as this is the name in the XML file. -
Thomas Löffler uploaded patch set 10 05/17/21, 07:40
-
core-ci voted on patch set 9 V +1 05/17/21, 07:44 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11575
-
core-ci voted on patch set 10 V +1 05/17/21, 07:47 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11576
-
Thomas Löffler uploaded patch set 11 05/17/21, 08:08
-
core-ci voted on patch set 11 V +1 05/17/21, 08:19 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11577
-
Oli Bartsch uploaded patch set 12 05/17/21, 09:25
-
Oli Bartsch voted on patch set 12 V +1 CR +1 05/17/21, 09:33
-
core-ci voted on patch set 12 V +1 05/17/21, 09:35 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11581
-
Thomas Löffler uploaded patch set 13 05/17/21, 13:51
-
core-ci voted on patch set 13 V +1 05/17/21, 14:01 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11591
-
Oli Bartsch voted on patch set 13 V +1 CR +1 05/18/21, 08:01
-
Thomas Löffler uploaded patch set 14 05/20/21, 07:46
-
core-ci voted on patch set 14 V +1 05/20/21, 07:58 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11696
-
Oli Bartsch voted on patch set 14 V +1 CR +1 05/20/21, 22:02
-
Jochen Roth voted on patch set 14 V +1 CR +1 05/21/21, 11:28
-
Oli Bartsch commented on patch set 14 V -1 CR 0 05/21/21, 11:57
Distribution.html:5Will now lead to "broken" images in case no internet connection or TER is unavailable. -
Oli Bartsch uploaded patch set 15 05/21/21, 12:01
-
Oli Bartsch commented on patch set 15 05/21/21, 12:02
Distribution.html:5ReplyDone -
core-ci voted on patch set 15 V -1 05/21/21, 12:09 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11769
-
Jochen Roth commented on patch set 15 V -1 05/21/21, 12:38
Extension.php:707Throws `file_get_contents(): php_network_getaddresses: getaddrinfo failed` @file_get_contents(... would fix it. -
Thomas Löffler uploaded patch set 16 05/21/21, 12:45
-
Oli Bartsch uploaded patch set 17 05/21/21, 12:50
-
Oli Bartsch commented on patch set 17 05/21/21, 12:52
Extension.php:707ReplyDone -
core-ci voted on patch set 16 V +1 05/21/21, 12:52 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11771
-
core-ci voted on patch set 17 V +1 05/21/21, 12:58 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11772
-
Thomas Löffler voted on patch set 17 V +1 CR +1 05/21/21, 13:01
-
Oli Bartsch voted on patch set 17 V +1 CR +1 05/21/21, 13:26
-
Jochen Roth voted on patch set 17 V +1 CR +1 05/21/21, 13:40
-
Oliver Hader voted on patch set 17 CR -1 05/21/21, 15:18
-
Oliver Hader commented on patch set 17 05/21/21, 15:30
I see the next discussion on data retrieved from 3rd party locations from within the TYPO3 backend...Extension.php:707`file_get_contents` is a blocking request - don't handle that on the PHP sideExtensionXmlPullParser.php:143Please ensure the URI is prefixed with verified origin locations, e.g. `https://extensions.typo3.org/fileadmin/ter/p` - `ftp://hacker.org/` is definitively not valid...ext_tables.sql:29What if the URI is longer than 255 characters? -
Oli Bartsch commented on patch set 17 V 0 CR 0 05/21/21, 15:56
Reply
Fully get your point. I'm however kind of unsure. Using the extension manager always means connecting to TER in some way. Be it on updating the extensions list, installing new extensions / distributions, checking composer status of extensions, and so on. This patch just adds another connection to TER (not any 3rd party) to retrieve the distribution images (They are stored in extensions.typo3.org/fileadmin/../). The alternative would be to store the distribution images locally when updating the extension list. TBH this also doesn't sound reasonable to me.Extension.php:707ReplyAckExtensionXmlPullParser.php:143ReplyAs far as I understood Thomas correct, this URL is not maintained by the distribution author but build by the TER in a stanzdardized way. See: https://gitlab.typo3.org/services/t3o-sites/extensions.typo3.org/ter/-/blob/develop/extensions/ter_fe2/Classes/Service/ExtensionIndexService.php#L116ext_tables.sql:29ReplySame as above. Since the URL is build in the TER we ensure 255 chars will never be exceeded. If I recall correctly, Thomas said, this URL won't be longer than ~100 characters. -
Oli Bartsch commented on patch set 17 05/21/21, 16:00
Extension.php:707ReplyDo you have any preferred method, how to handle this instead?
-
Oli Bartsch commented on patch set 17 05/21/21, 16:09
ExtensionXmlPullParser.php:143ReplyThought about it again. I'm convinced that it would definitely be a good idea to check the origin anyway. -
Oliver Hader commented on patch set 17 05/22/21, 07:04
Reply
My remark was based on the assumption the distribution image property can be an arbitrary URI - which would lead to scenarios when browsers fetch that image and would expose the personal IP. It's probably okay in case it's "just" the TER.ExtensionXmlPullParser.php:143ReplyCool, thx. Since there might be different mirrors/repositories (not just extensions.typo3.org), at least that particular origin could be checked. -
Thomas Löffler uploaded patch set 18 05/26/21, 13:16
-
Thomas Löffler commented on patch set 18 05/26/21, 13:19
ext_tables.sql:29ReplyLongest possible URL currently would have 111 chars. -
core-ci voted on patch set 18 V +1 05/26/21, 13:24 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11867
-
Oli Bartsch uploaded patch set 19 05/28/21, 15:37
-
Oli Bartsch commented on patch set 19 05/28/21, 15:42
Extension.php:707ReplyThis is now done with an HTML only solution.ExtensionXmlPullParser.php:143ReplyAdded the regExp /^https:\/\/extensions\.typo3\.org[a-zA-Z0-9._\/]+Distribution\.png$/ to check for origin and the filename.ext_tables.sql:29ReplyDone -
core-ci voted on patch set 19 V +1 05/28/21, 15:52 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11947
-
Christian Kuhn commented on patch set 19 CR -1 05/28/21, 18:58
This works in chrome, but firefox denies to load the remote images: "The loading of “https://extensions.typo3.org/fileadmin/ter/i/n/introduction_4.2.0_Distribution.png” in a frame is denied by “X-Frame-Options“ directive set to “SAMEORIGIN“."Show.html:8this is currently resolved to '<object data="EXT:extensionmanager/Resources/Public/Images/Distribution.svg"' leading to a 'GET ext:extensionmanager/Resources/Public/Images/Distribution.svg net::ERR_UNKNOWN_URL_SCHEME' in chrome. -
Oli Bartsch commented on patch set 19 05/28/21, 19:07
Thanks for testing. So the current approach does not work. Seems like we unfortunately have to go with JavaScript to solve this..Reply
ACKShow.html:8ReplyACK -
Oli Bartsch uploaded patch set 20 05/28/21, 22:58
-
Oli Bartsch uploaded patch set 21 05/28/21, 23:06
-
core-ci voted on patch set 20 V -1 05/28/21, 23:07 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11962
-
core-ci voted on patch set 21 V +1 05/28/21, 23:13 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11963
-
Christian Kuhn uploaded patch set 22 05/30/21, 18:05
-
Anja Leichsenring voted on patch set 22 V +1 CR +1 05/30/21, 18:07
-
Christian Kuhn updated the commit message in patch set 23 05/30/21, 18:10
-
Anja Leichsenring voted on patch set 23 V +1 CR +1 05/30/21, 18:11
-
Christian Kuhn voted on patch set 23 V +1 CR +1 05/30/21, 18:11
-
core-ci voted on patch set 22 V +1 05/30/21, 18:15 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12005
-
core-ci voted on patch set 23 V +1 05/30/21, 18:19 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12006
-
Thomas Löffler voted on patch set 23 CR +1 05/31/21, 08:58
-
Oli Bartsch voted on patch set 23 V +2 CR +2 05/31/21, 09:37
-
Oli Bartsch merged patch set 24 05/31/21, 09:37
Extension.php:706