65032[FEATURE] Allow system maintainer to mute disable_functions error
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Jochen Roth +1
- Garvin Hicking +1
-
Verified V +2 Done
- Stefan Bürk +2
- Jochen Roth +1
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/core/Configuration/DefaultConfiguration.php+1 −0
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml6+3 −0
- typo3/sysext/core/Documentation/Changelog/13.2/Feature-91783-AllowSystemMaintainerToMuteDisableFunctionsError.rst5new+39 −0
- typo3/sysext/install/Classes/SystemEnvironment/Check.php12+52 −10
Review log 6693
Show 4668 earlier messages
-
Albrecht Köhnlein uploaded patch set 1 07/11/20, 18:20
-
TYPO3com voted on patch set 1 V +1 07/11/20, 18:34 Completed build in 13m 57s on Sat, 11 Jul, 06:34 PM Test Summary: 72863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4070
-
Josef Glatz commented on patch set 2 07/15/20, 05:36
Published edit on patch set 1. -
Josef Glatz commented on patch set 2 V -1 07/15/20, 05:38
I think features are only for the master afair -
TYPO3com voted on patch set 2 V +1 07/15/20, 05:47 Completed build in 10m 44s on Wed, 15 Jul, 05:47 AM Test Summary: 72863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4098
-
Albrecht Köhnlein uploaded patch set 3 07/15/20, 06:33
-
Albrecht Köhnlein uploaded patch set 4 07/15/20, 06:35
-
Albrecht Köhnlein commented on patch set 4 07/15/20, 06:38
> Patch Set 2: Verified-1 > > (1 comment)Reply
Ok, I think you're right and I removed 10.4. Although I personally would need this feature in one of my TYPO3 10 projects, but I can handle it another way. :) -
TYPO3com voted on patch set 3 V +1 07/15/20, 06:45 Completed build in 12m 38s on Wed, 15 Jul, 06:45 AM Test Summary: 72862 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4099
-
TYPO3com voted on patch set 4 V +1 07/15/20, 06:49 Completed build in 13m 33s on Wed, 15 Jul, 06:49 AM Test Summary: 72863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4100
-
Jörg Bösche commented on patch set 4 CR -1 09/02/20, 08:33
Missing RST file for this feature. -
Jörg Bösche uploaded patch set 5 09/07/20, 09:00
-
TYPO3com voted on patch set 5 V +1 09/07/20, 09:11 Completed build in 11m 08s on Mon, 7 Sep, 09:11 AM Test Summary: 73227 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5313
-
Oli Bartsch commented on patch set 5 CR -1 09/07/20, 09:15
RST is somehow broken. Will have a look. -
Oli Bartsch uploaded patch set 6 09/07/20, 09:30
-
TYPO3com voted on patch set 6 V +1 09/07/20, 09:45 Completed build in 13m 38s on Mon, 7 Sep, 09:45 AM Test Summary: 73227 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5317
-
Jörg Bösche voted on patch set 6 CR +1 09/07/20, 09:55
-
Albrecht Köhnlein uploaded patch set 7 11/16/21, 20:11
-
Albrecht Köhnlein uploaded patch set 8 11/16/21, 20:24
-
core-ci voted on patch set 7 V -1 11/16/21, 20:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19372
-
core-ci voted on patch set 8 V -1 11/16/21, 20:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19374
-
Albrecht Köhnlein uploaded patch set 9 11/16/21, 20:28
-
Albrecht Köhnlein uploaded patch set 10 11/16/21, 20:30
-
core-ci voted on patch set 9 V -1 11/16/21, 20:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19375
-
Albrecht Köhnlein updated the commit message in patch set 11 11/16/21, 20:46
-
core-ci voted on patch set 10 V +1 11/16/21, 20:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19376
-
core-ci voted on patch set 11 V +1 11/16/21, 21:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19379
-
Benni Mack wrote 11/29/21, 10:13
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 12 11/29/21, 13:37
-
Albrecht Köhnlein commented on patch set 12 11/29/21, 17:19
By the way ... what would be the correct path for the RST file? At the moment, it's `master` too. Should it be changed to `main` or to `12.0` or something completly different? -
Benni Mack commented on patch set 12 04/14/23, 10:04
The feature should go into 12.4 (or 13.0 as we have feature freeze now) -
Chris Müller commented on patch set 12 09/26/23, 17:25
Reply
Currently, it would be "13.0". -
Georg Ringer commented on patch set 12 09/26/23, 21:50
Feature-91783-AddAllowListForPhpiniSettingDisable_functions.rst:14currently -
Garvin Hicking commented on patch set 12 V +1 CR +1 10/11/23, 15:48
Thanks for this contribution. This has just recently affected an installation of mine, and for a "tidy environment check" it would be really nice to filter this. I made some suggestions on wording, maybe they can be helpful. I'd love if this could be updated to be included in v13 main.DefaultConfigurationDescription.yaml:222I wonder if that can be more precise; people may read the config name to be related to "functions of TYPO3". So maybe: "allowedPhpDisableFunctions"?DefaultConfigurationDescription.yaml:224technically it would be "hosting provider's", but you could also host it yourself, so... I'd suggest to strike it all together and just reference "your php.ini".Feature-91783-AddAllowListForPhpiniSettingDisable_functions.rst:14ReplyOr "irrelevant to this installation"?Feature-91783-AddAllowListForPhpiniSettingDisable_functions.rst:16For v12 and up refer to `:file:config/system/settings.php`?Check.php:410Use the chance and rephrase this to "often"?Check.php:424"function"Check.php:426strip this, see aboveCheck.php:430"Notice for known irrelevant functions (e.g. pcntl_*)" -
Benni Mack wrote 01/30/24, 14:29
Removed cc Benni Mack. -
Garvin Hicking commented on patch set 12 04/05/24, 13:07
Hi @ak@koehnlein.eu - I hope my initial remarks some time ago didn't push you off. I do think this patch would be very nice to have, maybe we can work on it together if you like? (Feel free to hit me up on Slack) -
Albrecht Köhnlein commented on patch set 12 04/06/24, 15:33
Reply
Thanks for sending some motivation. I will continue my work the next days 😊 -
Albrecht Köhnlein uploaded patch set 13
CR +1V +104/06/24, 17:34 -
Albrecht Köhnlein uploaded patch set 14 04/06/24, 17:41
-
core-ci voted on patch set 13 V -1 04/06/24, 17:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55450
-
Albrecht Köhnlein commented on patch set 14 04/06/24, 17:42
DefaultConfigurationDescription.yaml:222ReplyChangedCheck.php:410ReplyChangedCheck.php:424ReplyChangedCheck.php:426ReplyChangedCheck.php:430ReplyChanged -
Albrecht Köhnlein commented on patch set 14 04/06/24, 17:43
DefaultConfigurationDescription.yaml:224ReplyChanged -
core-ci voted on patch set 14 V -1 04/06/24, 17:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55451
-
Albrecht Köhnlein uploaded patch set 15
V -104/06/24, 17:52 -
Albrecht Köhnlein uploaded patch set 16 04/06/24, 17:55
-
core-ci voted on patch set 15 V -1 04/06/24, 17:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55452
-
core-ci voted on patch set 16 V -1 04/06/24, 18:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55453
-
Albrecht Köhnlein uploaded patch set 17
V -104/06/24, 18:08 -
core-ci voted on patch set 17 V +1 04/06/24, 18:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55454
-
Albrecht Köhnlein uploaded patch set 18
V +104/07/24, 16:20 -
Albrecht Köhnlein commented on patch set 17 04/07/24, 16:22
Reply
DoneFeature-91783-AddAllowListForPhpiniSettingDisable_functions.rst:14ReplyThanks. I fixed the typoFeature-91783-AddAllowListForPhpiniSettingDisable_functions.rst:16ReplyJust realized, this still was open. I only used the new file name but not the full path. To be honest, I do not even know exactly, if the path is the same for non-composer installations. -
core-ci voted on patch set 18 V +1 04/07/24, 16:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55515
-
Garvin Hicking uploaded patch set 19
V +104/08/24, 13:21Some minor rephrasing -
Garvin Hicking commented on patch set 19 CR +1 V +1 04/08/24, 13:23
Thanks a lot for picking this up again. I took the liberty to change the wording in some minor aspects. I tested it again and works nicely for me!Feature-91783-AddAllowListForPhpiniSettingDisable_functions.rst:16ReplyDone -
core-ci voted on patch set 19 V +1 04/08/24, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55562
-
Albrecht Köhnlein uploaded patch set 20
CR +1V +104/24/24, 09:22 -
core-ci voted on patch set 20 V +1 04/24/24, 09:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56645
-
Garvin Hicking voted on patch set 20 CR +1 V +1 04/24/24, 09:31
-
Stephan Großberndt commented on patch set 21
CR +1V +104/24/24, 09:56Published edit on patch set 20. -
core-ci voted on patch set 21 V +1 04/24/24, 10:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56646
-
Stephan Großberndt updated the commit message in patch set 22
V +104/24/24, 10:01 -
Stephan Großberndt uploaded patch set 23 04/24/24, 10:08
-
core-ci voted on patch set 22 V +1 04/24/24, 10:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56648
-
Stephan Großberndt voted on patch set 23 CR +1 04/24/24, 10:09
-
core-ci voted on patch set 23 V +1 04/24/24, 10:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56649
-
Garvin Hicking voted on patch set 23 CR +1 V +1 04/24/24, 10:14
-
Stephan Großberndt uploaded patch set 24
CR +1V +104/24/24, 10:16 -
Stephan Großberndt uploaded patch set 25 04/24/24, 10:21
-
core-ci voted on patch set 24 V +1 04/24/24, 10:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56651
-
core-ci voted on patch set 25 V +1 04/24/24, 10:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56652
-
Stephan Großberndt voted on patch set 25 CR +1 V +1 04/24/24, 10:37
-
Garvin Hicking voted on patch set 25 CR +1 V +1 04/24/24, 11:50
-
Georg Ringer commented on patch set 25 04/24/24, 18:04
Feature-91783-AllowSystemMaintainerToMuteDisableFunctionsError.rst:15we call it "Install Tool" -
Albrecht Köhnlein uploaded patch set 26
CR +1V +104/24/24, 19:33 -
Albrecht Köhnlein commented on patch set 26 04/24/24, 19:34
Feature-91783-AllowSystemMaintainerToMuteDisableFunctionsError.rst:15ReplyChanged it -
core-ci voted on patch set 26 V +1 04/24/24, 19:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56666
-
Stefan Bürk commented on patch set 26 CR -1 04/24/24, 20:55
on it ... -
Stefan Bürk voted on patch set 26 CR 0 05/06/24, 06:54
-
Garvin Hicking commented on patch set 26 CR +1 V +1 05/08/24, 22:04
Stefan, if you remember what you wanted to address here, let me know and we'll work it out. Really hope we can get this off the ground 🥹Feature-91783-AllowSystemMaintainerToMuteDisableFunctionsError.rst:15ReplyDone -
André Buchmann voted on patch set 26 CR +1 05/29/24, 10:53
-
Benjamin Franzke commented on patch set 26 CR -1 06/03/24, 06:23
DefaultConfigurationDescription.yaml:166This should be `type: array` -
Garvin Hicking uploaded patch set 27
CR +1V +106/03/24, 18:28Change config option to array -
Garvin Hicking commented on patch set 27 CR +1 V +1 06/03/24, 18:58
DefaultConfigurationDescription.yaml:166ReplyGood suggestion, I've changed this to an array know. @ak@koehnlein.eu - hope it was ok to rush ahead with this change - I'd really like this for our installations reporting false positives :) -
core-ci voted on patch set 27 V +1 06/03/24, 19:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58632
-
Jochen Roth voted on patch set 27 CR +1 V +1 06/13/24, 12:56
-
Stefan Bürk commented on patch set 27 CR -1 06/13/24, 15:19
Feature-91783-AllowSystemMaintainerToMuteDisableFunctionsError.rst:26That's the structure in a `additional.php`. For `settings.php` this would be more like: ```php <?php return [ 'SYS' => [ 'allowedPhpDisableFunctions' => [ 'set_time_limit', 'set_file_buffer', ], // ... ], // ... ]; ```Check.php:376I would chop this tenary down so it is "readable" in one-go without having to read to much from left to right (and avoid a extreme long line) - and no need for using `()` around the full statement here. Using `()` should be done on the tenary condition if it has multiple parts. ```php $configuredAllowedDisableFunctions = is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['allowedPhpDisableFunctions']) ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['allowedPhpDisableFunctions'] : [] ; ``` What do you think to further simplify this here: ```php $configuredAllowedDisableFunctions = $GLOBALS['TYPO3_CONF_VARS']['SYS']['allowedPhpDisableFunctions'] ?? []; if (!is_array($configuredAllowedDisableFunctions)) { $configuredAllowedDisableFunctions = []; } ```Check.php:380I would reverse the check to move the foreach with a continue up and having the simple unset without a else block here to reduce the load a bit (or using continue for the simple unset and moving the foreach out of the else block. **Either this one ...** ```php foreach ($disabledFunctionsArray as $key => $disabledFunction) { if (in_array($disabledFunction, $configuredAllowedDisableFunctions, true)) { unset($disabledFunctionsArray[$key]); $foundAllowedDisableFunctions[] = $disabledFunction; continue; } foreach ($findStrings as $findString) { if (str_contains($disabledFunction, $findString)) { unset($disabledFunctionsArray[$key]); } } } ``` **... or this one** ```php foreach ($disabledFunctionsArray as $key => $disabledFunction) { if (in_array($disabledFunction, $configuredAllowedDisableFunctions, true)) { foreach ($findStrings as $findString) { if (str_contains($disabledFunction, $findString)) { unset($disabledFunctionsArray[$key]); } } continue; } unset($disabledFunctionsArray[$key]); $foundAllowedDisableFunctions[] = $disabledFunction; } ``` -
Garvin Hicking uploaded patch set 28
CR +1V +106/14/24, 07:16Apply code review suggestions -
Garvin Hicking commented on patch set 28 06/14/24, 07:17
Thanks for the feedback, Stefan. I've conferred with Albrecht and he gave me the go-ahead to adjust this, I think these were good improvements.Feature-91783-AllowSystemMaintainerToMuteDisableFunctionsError.rst:26ReplyGood catch. Adjusted and described all three ways (additional, settings, gui)Check.php:376ReplySure! I think the latter version is fine.Check.php:380ReplyI think the first one is better to parse, thanks for the suggestion. -
Garvin Hicking voted on patch set 28 CR +1 V +1 06/14/24, 07:17
-
core-ci voted on patch set 28 V +1 06/14/24, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59574
-
Jochen Roth voted on patch set 28 CR +1 V +1 06/14/24, 07:34
-
Stefan Bürk voted on patch set 28 CR +2 V +2 06/28/24, 22:04
-
Stefan Bürk merged patch set 29 06/28/24, 22:04