Review main Merged

81425[BUGFIX] Adjust config file path in Install Tool password hint

Jan Greth CR +2 V +2 Easy +7 −3 updated 10/18/23, 12:14

Commit message

The file `settings.php`, which stores the value of
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] is
located under `config/system/` in Composer-mode. If a project
is not set up with composer it is `typo3conf/system/`.

The hint next to the Install Tool's login mask spells the wrong
path, which is corrected with this patch. Also the difference
between legacy and composer setups is taken into account, without
exposing information about the projects file structure.

Review

  • Code review CR +2 Done
    • Nikita Hovratov +2
    • Garvin Hicking +1
    • Markus Klein +1
    • Jan Greth +1
  • Verified V +2 Done
    • Nikita Hovratov +2
    • Garvin Hicking +1
    • Jan Greth +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 3441

Show 1316 earlier messages
  1. Jan Greth uploaded patch set 1 10/13/23, 15:27

  2. core-ci voted on patch set 1 V +1 10/13/23, 15:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47744

  3. Nikita Hovratov commented on patch set 1 10/13/23, 15:37

    In classic mode this is still typo3conf/system. So both should be named.
  4. Jan Greth commented on patch set 1 10/13/23, 16:31

    Reply

    Mh... In `\TYPO3\CMS\Install\Controller\LoginController::showLoginAction()` we could pass something like ``` $view->assignMultiple([ ... 'configFile' => Environment::getConfigPath() . '/system/settings.php', ]); ``` to the template - but that would result in the absolute path of settings.php. What's your opinion?
  5. Nikita Hovratov commented on patch set 1 10/13/23, 16:34

    Reply

    That would be great!
  6. Jan Greth uploaded patch set 2 V +1 10/13/23, 18:23

  7. core-ci voted on patch set 2 V +1 10/13/23, 18:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47748

  8. Jan Greth commented on patch set 2 10/13/23, 18:41

    Reply

    Done
  9. Andreas Kienast commented on patch set 2 10/16/23, 07:35

    LoginController.php:63

    We need another slash here, otherwise the path is rendered as `/var/www/html/public/typo3confsystem/settings.php`. Also, I'm not sure whether we should expose the full path.
  10. Garvin Hicking commented on patch set 2 10/16/23, 16:36

    LoginController.php:63 Reply

    I thought about that the same and it felt "dangerous". Then again, the install tool will only reveal that if it's unlocked. So an attacker would already need to have access to the filesystem (or use an exploit to put it there), in which case he'd already have means about introspecting the filesystem....? I tend to believe the upsides of better locating the files weigh harder then this "information disclosure" - but just $0.0.2
  11. Jan Greth uploaded patch set 3 V +1 10/17/23, 07:32

  12. Jan Greth commented on patch set 3 V +1 CR +1 10/17/23, 07:34

    LoginController.php:63 Reply

    That's a good thought and makes totally sense.
  13. core-ci voted on patch set 3 V +1 10/17/23, 07:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47847

  14. Garvin Hicking voted on patch set 3 V +1 CR +1 10/17/23, 09:33

  15. Benjamin Franzke commented on patch set 3 CR -1 10/17/23, 11:17

    LoginController.php:63 Reply

    I was inclined to agree, but the install-tool is unlocked whenever the administrator has created the ENBALE_INSTALL_TOOL file. That means – during that period of time – this would be an information disclosure for a 3rd party that visits /typo3/install.php – without any authentication. I'm leaving CR-1 for that reason for now.
  16. Garvin Hicking commented on patch set 3 10/17/23, 11:27

    LoginController.php:63 Reply

    True, that's a possible "race condition", good note. Then the patch would need to strip the absolute path prefix? So that the output would just be one of: - typo3conf/system/settings.php - config/system/settings.php IMO it would be important for uses to realize that the current static filename may not be in sync with the actual installation. An alternative would be to statically print: `(typo3conf|config)/system/settings.php` then people could understand that there are two (or even more, I don't know?) locations.
  1. Garvin Hicking voted on patch set 3 CR 0 10/17/23, 11:27

  2. Benjamin Franzke commented on patch set 3 10/17/23, 11:43

    LoginController.php:63 Reply

    My suggestion is: Output different *static* info strings based on `Environment::isComposeMode()`.
  3. Jan Greth uploaded patch set 4 CR +1 V +1 10/17/23, 12:22

  4. Jan Greth commented on patch set 4 10/17/23, 12:25

    I changed my code after Benjamin Franzke's hint using `isComposerMode()`. This way we can output the correct path without exposing too much.
  5. Jan Greth commented on patch set 4 10/17/23, 12:25

    LoginController.php:63 Reply

    Done
  6. core-ci voted on patch set 4 V +1 10/17/23, 12:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47865

  7. Garvin Hicking voted on patch set 4 V +1 CR +1 10/17/23, 14:30

  8. Nikita Hovratov voted on patch set 4 V +1 CR +1 10/17/23, 15:06

  9. Markus Klein updated the commit message in patch set 5 CR +1 V +1 10/17/23, 16:08

  10. Markus Klein voted on patch set 5 CR +1 10/17/23, 16:08

  11. Oliver Hader commented on patch set 5 10/17/23, 16:09

    LoginController.php:64

    What about using `ConfigurationManager::getSystemConfigurationFileLocation(true)` directly`
  12. core-ci voted on patch set 5 V +1 10/17/23, 16:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47880

  13. Jan Greth uploaded patch set 6 CR +1 V +1 10/18/23, 07:31

  14. Jan Greth commented on patch set 6 V +1 CR +1 10/18/23, 07:35

    LoginController.php:64 Reply

    That's indeed a good solution. Didn't know that.
  15. core-ci voted on patch set 6 V +1 10/18/23, 07:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47892

  16. Garvin Hicking voted on patch set 6 V +1 CR +1 10/18/23, 07:48

  17. Nikita Hovratov uploaded patch set 7 CR +1 V +1 10/18/23, 07:54

  18. Nikita Hovratov voted on patch set 7 V +1 CR +1 10/18/23, 07:55

  19. core-ci voted on patch set 7 V +1 10/18/23, 08:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47893

  20. Markus Klein voted on patch set 7 CR +1 10/18/23, 08:54

  21. Garvin Hicking voted on patch set 7 V +1 CR +1 10/18/23, 11:02

  22. Jan Greth voted on patch set 7 CR +1 10/18/23, 11:57

  23. Jan Greth voted on patch set 7 V +1 10/18/23, 11:57

  24. Nikita Hovratov voted on patch set 7 V +2 CR +2 10/18/23, 12:14

  25. Nikita Hovratov merged patch set 8 10/18/23, 12:14