84424[FEATURE] Add file embedding option to asset viewhelpers
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- Simon Praetorius +1
-
Verified V +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- Simon Praetorius +1
- core-ci +1 CI
Issues 1
Files 7
- typo3/sysext/core/Documentation/Changelog/13.3/Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst4new+42 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/CssViewHelper.php2+12 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/ScriptViewHelper.php6+12 −1
- typo3/sysext/fluid/Tests/Functional/Fixtures/ViewHelpers/CssViewHelper.cssnew+3 −0
- typo3/sysext/fluid/Tests/Functional/Fixtures/ViewHelpers/ScriptViewHelper.jsnew+1 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Asset/CssViewHelperTest.php+17 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Asset/ScriptViewHelperTest.php+17 −0
Review log 4666
Show 2841 earlier messages
-
André Buchmann uploaded patch set 1 05/27/24, 12:29
-
core-ci voted on patch set 1 V +1 05/27/24, 12:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58343
-
Stefan Bürk commented on patch set 1 05/27/24, 12:40
Features are main only and need a feature ReST file. You can use https://forger.typo3.com/utilities/rst to create one. -
André Buchmann uploaded patch set 2
V +105/27/24, 13:07 -
André Buchmann commented on patch set 2 05/27/24, 13:12
Reply
Thank you for mentioning this tool ❤️ Added a ReST file. Open for improvents on the text ;-) -
core-ci voted on patch set 2 V +1 05/27/24, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58347
-
Garvin Hicking commented on patch set 2 05/27/24, 16:22
Nice option to have! Just a doc question, will test this later, too :)Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst:16What does CLS stand for, could you use the unabbreviated version here too? Also maybe you can insert linewraps at ~80 chars in this doc? -
Garvin Hicking commented on patch set 2 05/27/24, 16:24
ScriptViewHelper.php:144Could this be used to inject arbitrary file contents into the head, if I specify a path like ../../../../etc/passwd or so? Or read other files? Maybe for safety restrict to .js/.css files? -
André Buchmann uploaded patch set 3
V +105/27/24, 21:02 -
André Buchmann uploaded patch set 4 05/27/24, 21:06
-
core-ci voted on patch set 3 V -1 05/27/24, 21:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58355
-
André Buchmann commented on patch set 3 05/27/24, 21:12
Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst:16ReplyDoneScriptViewHelper.php:144ReplyWith GeneralUtility::getFileAbsFileName() only project files can be accessed. Is this enough for path security? Checking for file extension doesn't really make it more secure? Does it? Also I think the file ending for JavaScript files may not .js but .cjs, ... -
core-ci voted on patch set 4 V +1 05/27/24, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58356
-
Mathias Brodala commented on patch set 4 05/28/24, 14:21
Please resolve this abbrev. ;-) -
Mathias Brodala commented on patch set 4 05/28/24, 14:23
If at all this should be done with separate viewhelpers, see "single-responsibility principle". -
André Buchmann updated the commit message in patch set 5
V +105/29/24, 07:49 -
Garvin Hicking commented on patch set 5 05/29/24, 07:50
ScriptViewHelper.php:144ReplyI understand, that would make white-listing these file patterns problematic. We had a (security-relevant) chat with Olly, so I can resolve this :) -
core-ci voted on patch set 5 V +1 05/29/24, 07:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58437
-
André Buchmann commented on patch set 5 05/29/24, 07:57
Reply
I think the single-responsibility for those viewhelpers is to provide an easy way in fluid templates to include additional css/js. It already supports inline styles by writing them as child-content. This change is like the "inline" option for typoscript which does basically the same as page.includeCSS.foo.inline = 1 https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/TopLevelObjects/Page/Index.html#confval-page-includecssReply
DoneScriptViewHelper.php:144ReplyAs discussed with @oliver.hader@typo3.org this is secure enough as the dev editing a fluid template could include malicious scripts etc. anyways in the template and needs to make sure to include the correct files. -
André Buchmann uploaded patch set 6
V +107/24/24, 14:51 -
André Buchmann uploaded patch set 7 07/24/24, 14:54
-
core-ci voted on patch set 7 V +1 07/24/24, 15:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62108
-
core-ci voted on patch set 6 V -1 07/24/24, 15:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62107
-
André Buchmann rebased onto patch set 8
V +109/06/24, 13:12 -
core-ci voted on patch set 8 V +1 09/06/24, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64956
-
Simon Praetorius commented on patch set 8 09/09/24, 21:39
CssViewHelper.php:107Is this line necessary? I would imagine that embed only ends up in `$this->arguments` and not in tag attributes.ScriptViewHelper.php:110same here -
André Buchmann uploaded patch set 9
V +109/10/24, 05:25 -
core-ci voted on patch set 9 V +1 09/10/24, 05:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65176
-
André Buchmann commented on patch set 9 09/10/24, 05:32
CssViewHelper.php:107ReplyYou're totally right. Removed the lineScriptViewHelper.php:110ReplyDone -
Oli Bartsch uploaded patch set 10
V +109/10/24, 12:11 -
Oli Bartsch voted on patch set 10 CR +1 V +1 09/10/24, 12:11
-
core-ci voted on patch set 10 V -1 09/10/24, 12:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65229
-
core-ci voted on patch set 10 V +1 09/10/24, 12:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65229
-
Oli Bartsch uploaded patch set 11
CR +1V +109/10/24, 12:35 -
core-ci voted on patch set 11 V +1 09/10/24, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65239
-
Mathias Brodala commented on patch set 12
V +109/10/24, 12:45Published edit on patch set 11. -
Oli Bartsch commented on patch set 12 CR -1 09/10/24, 12:50
New argument should be named "inline" to be consitent with corresponding TypoScript (see e.g. https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/TopLevelObjects/Page/Index.html#confval-page-includecss) -
Oli Bartsch uploaded patch set 13
CR -109/10/24, 12:53 -
core-ci voted on patch set 12 V +1 09/10/24, 12:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65241
-
Oli Bartsch uploaded patch set 14 09/10/24, 12:54
-
Oli Bartsch commented on patch set 14 09/10/24, 12:54
Reply
Done
-
Oli Bartsch voted on patch set 14 CR +1 V +1 09/10/24, 12:54
-
core-ci voted on patch set 13 V +1 09/10/24, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65244
-
Mathias Brodala commented on patch set 14 09/10/24, 13:02
Reply
... while dropping my RST improvements. Oh well. -
core-ci voted on patch set 14 V +1 09/10/24, 13:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65245
-
Garvin Hicking commented on patch set 15
CR +1V +109/10/24, 13:06Published edit on patch set 14. -
Garvin Hicking commented on patch set 15 09/10/24, 13:10
Reply
Ew sorry, I made a further mess by editing over Olivers version to change some minor things. The "nonce" thing is factually correct, right? Haven't tested this ;) -
core-ci voted on patch set 15 V +1 09/10/24, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65248
-
Oli Bartsch uploaded patch set 16
V +109/10/24, 14:38 -
core-ci voted on patch set 16 V +1 09/10/24, 14:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65264
-
Oliver Hader commented on patch set 16 09/10/24, 15:07
Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst:42The `nonce` HTML attribute is only applied in case `useNonce=1` is explicitly given for the corresponding view-helper. -
Oliver Hader commented on patch set 17
V +109/10/24, 15:11Published edit on patch set 16. -
Oliver Hader commented on patch set 17 09/10/24, 15:11
Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst:42ReplyDone -
Oli Bartsch commented on patch set 17 CR +1 V +1 09/10/24, 15:12
Reply
Done -
core-ci voted on patch set 17 V +1 09/10/24, 15:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65270
-
André Buchmann commented on patch set 17 CR +1 V +1 09/10/24, 15:24
Thank you all for improving my patch <3 -
Garvin Hicking commented on patch set 17 CR +1 V +1 09/10/24, 15:50
Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst:14This one is in constant spelling pain :D (also "extendend" is wrong). Now wanting to reset votes, so decide if this shall be addressed before merging. -
Oli Bartsch commented on patch set 18
CR +1V +109/10/24, 15:57Published edit on patch set 17. -
Oli Bartsch commented on patch set 18 CR +1 V +1 09/10/24, 15:57
Feature-99510-AddFileEmbeddingOptionToAssetViewhelpers.rst:14ReplyDone -
core-ci voted on patch set 18 V +1 09/10/24, 16:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65278
-
Simon Praetorius uploaded patch set 19
CR +1V +109/10/24, 16:26 -
Simon Praetorius voted on patch set 19 CR +1 V +1 09/10/24, 16:27
-
core-ci voted on patch set 19 V +1 09/10/24, 16:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65283
-
Garvin Hicking voted on patch set 19 CR +1 V +1 09/10/24, 16:45
-
Oli Bartsch voted on patch set 19 CR +2 V +2 09/10/24, 17:20
-
Oli Bartsch merged patch set 20 09/10/24, 17:20