Review main Merged

84448[TASK] Improve instructions when installToolPassword is empty

Mathias Bolt Lesniak CR +2 V +2 Normal +71 −9 updated 11/18/26, 19:41

Commit message

To improve UX for new users, this patch replaces the generic
plain-text error message with a user interface with instructions
on how to proceed, including the `install:password:set` CLI
command.

Also removes mention of `$GLOBALS['TYPO3_CONF_VARS']` in the login
instructions for resetting the password, as this is no longer
mentioned in the settings.php file.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Benni Mack +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Benni Mack +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 81105

Show 5980 earlier messages
  1. Mathias Bolt Lesniak uploaded patch set 1 05/30/24, 14:08

  2. core-ci voted on patch set 1 V -1 05/30/24, 14:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58490

  3. Mathias Bolt Lesniak uploaded patch set 2 V -1 05/30/24, 14:21

  4. core-ci voted on patch set 2 V +1 05/30/24, 14:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58491

  5. Garvin Hicking commented on patch set 2 05/30/24, 15:19

    (Sorry, just some superficial feedback about the wording part that maybe can be streamlined? Can't comment/test yet on the functionality itself)

    ShowNoInstallToolPassword.html:13

    I think other HTML templates do not use Upper Case for all words, just the first one, i.e. "The Install Tool is locked", "Install Tool is permanently enabled", "Something went wrong", "Get help in the TYPO3 Documentation" is what I could find with "callout-title" in the current code?

    ShowNoInstallToolPassword.html:17

    I think maybe the two breaks here are not needed, this looks a bit off in the screenshot, too? Maybe write "after the line:" and then place the breaks, so that the code starts indented on a fresh line?

    ShowNoInstallToolPassword.html:25

    "Try again"?

    ShowNoInstallToolPassword.html:33

    "No Install Tool password"?

    ShowNoInstallToolPassword.html:55

    "Generate a new password hash"?

    ShowNoInstallToolPassword.html:68

    "Generate password hash"?
  6. Mathias Bolt Lesniak uploaded patch set 3 V +1 05/30/24, 15:45

  7. core-ci voted on patch set 3 V +1 05/30/24, 15:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58495

  8. Mathias Bolt Lesniak uploaded patch set 4 V +1 05/30/24, 15:50

  9. Mathias Bolt Lesniak commented on patch set 3 05/30/24, 15:53

    ShowNoInstallToolPassword.html:13 Reply

    You're right. I was errouneously using the typo3.org style. This is fixed in patchset 2.

    ShowNoInstallToolPassword.html:17 Reply

    This is maybe not so intuitive either way. `'BE' => [` is the existing code and `'installToolPassword' => '{hashedPassword}',` must be added after it. Idependently of the line feed, I think it still looks like people could mix up new and old code.

    ShowNoInstallToolPassword.html:25 Reply

    You're right. I was errouneously using the typo3.org style. This is fixed in patchset 2.

    ShowNoInstallToolPassword.html:33 Reply

    You're right. I was errouneously using the typo3.org style. This is fixed in patchset 3.

    ShowNoInstallToolPassword.html:55 Reply

    You're right. I was errouneously using the typo3.org style. This is fixed in patchset 2.

    ShowNoInstallToolPassword.html:68 Reply

    You're right. I was errouneously using the typo3.org style. This is fixed in patchset 2.
  10. core-ci voted on patch set 4 V +1 05/30/24, 15:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58496

  11. Mathias Bolt Lesniak uploaded patch set 5 V +1 05/30/24, 18:40

  12. Mathias Bolt Lesniak commented on patch set 5 05/30/24, 18:43

    ShowNoInstallToolPassword.html:17 Reply

    After a bit of pondering I found a way to formulate it that I think makes it clearer. I changed it in patchset 5. The text now reads: "Find the line 'BE' => [ and place the following code immediately after it:" followed by the code to insert.
  13. core-ci voted on patch set 5 V +1 05/30/24, 18:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58497

  14. Mogens Fiebrandt commented on patch set 5 05/30/24, 23:42

    ShowNoInstallToolPassword.html:44

    I tested the message by calling the install tool directly and via the admin tools in the backend. Works both like a charm. But obviously the user does not install TYPO3 when calling the install tool in the backend. You could check $request->getQueryParams()['install']['context'] in the LoginController to determine the actual context and then hide this list item.
  15. Mathias Bolt Lesniak uploaded patch set 6 V +1 05/31/24, 06:38

  16. Mathias Bolt Lesniak commented on patch set 6 05/31/24, 06:40

    ShowNoInstallToolPassword.html:44 Reply

    Thank you for testing! Using the install context is a great idea! I implemented it in patchset 6.
  17. core-ci voted on patch set 6 V +1 05/31/24, 06:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58522

  18. Mogens Fiebrandt commented on patch set 6 CR +1 V +1 05/31/24, 07:20

    The plain-text error message was already a great help. This is even better. Tested intsall tool directly and in backend admin tools. Works both like a charme.
  19. Garvin Hicking commented on patch set 6 05/31/24, 09:09

    (Sadly I can't test this easily atm, because installing TYPO3 from a GIT clone in my DDEV environment always yields a "Trusted hosts pattern mismatch" (https://gist.github.com/garvinhicking/2fa3ee0d8ddc818be9ce903564a6ff81) for me, and because TYPO3 is not installed and does not evaluate AdditionalConfiguration at this point, I cannot adapt it. This is unrelated to your patch of course. Unblocking the HTML change at least :))

    ShowNoInstallToolPassword.html:17 Reply

    Thanks, from a code-read this should look good!
  20. Nikita Hovratov commented on patch set 6 05/31/24, 09:41

    When opening the install tool without a password via typo3/install.php I immediately see the new message and the hash generator. Not sure if this could be potentially harmful as anyone could generate password hashes. Maybe someone from security team could answer this?
  21. Mathias Bolt Lesniak commented on patch set 6 05/31/24, 09:45

    Reply

    Good to have their opinion. I'll ping them. For the record, the generator only generates the password hash. You still need write access to the file system in order to actually change the password.
  22. Garvin Hicking commented on patch set 6 05/31/24, 10:21

    Maintenance.php:101

    I wonder because of moving this to after executing initAction(), in the case the installPassword is empty, now initAction() would actually be executed. Can this have (security-related) side effects?

    ShowLogin.html:54

    Unsure if we shouldn't leave this out? It's not really a property here, but an array key - and I suppose no one reading this would care about that specificity, if the array key is directly mentioned...?

    ShowNoInstallToolPassword.html:25

    I this case I wonder what "Try again" would reflect? My intuition would say "Try again to create the password hash", but in reality you probably mean "Check if the person reading this has inserted the password into the file and reload the installation tool to check if it can now be properly loaded". So how about labelling this button "Reload install tool" or "Try again to access install tool"?

    ShowNoInstallToolPassword.html:50

    This would now possibly disclose a file information to un-authenticated users directly. This would help attackers to see whether legacy mode or composer mode is used. Maybe better not mention this exact file location? Also: For our projects we actually define the install tool through AdditionalConfiguration.php in an external file (that is not versioned), and personally I feel this is a good recommendation. So generally we might not want to assume that the installToolPassword is actually located in settings.php/LocalConfiguration.php and it would help to just say "in the expected config file" or "like settings.php/LocalConfiguration.php/AdditionalConfiguration.php"? (Also note, if the settings.php is locked on live instances with missing write permissions, that base file can not even be edited and setting a password must be done with other means)
  23. Torben Hansen commented on patch set 6 V -1 05/31/24, 10:39

    Besides the already mentioned Denial of Service scenario, we should in general completely avoid to display password hashes or to let a remote/unauthenticated user create an arbitrary amount of password hashes. So -1 from me, until we have opinions from other security team members.
  24. Mathias Bolt Lesniak commented on patch set 6 05/31/24, 11:48

    Maintenance.php:101 Reply

    I haven't detected any myself. This is implemented the same way as the "The Install Tool is locked" message.

    ShowLogin.html:54 Reply

    Good point. Will remove it.

    ShowNoInstallToolPassword.html:25 Reply

    "Reload install tool" sounds like the best one. I'll implement that.

    ShowNoInstallToolPassword.html:50 Reply

    The "The Install Tool is locked" message already mentions the path to the ENABLE_INSTALL_TOOL file, which is similar.
  25. Patrick Schriner commented on patch set 6 05/31/24, 19:23

    Maintenance.php:101 Reply

    As side note, someone has had an interest to have a TYPO3 instance without any real installToolPassword set; The customer doesn't want the install tool to be usable at all by password. As far as I can tell, that used to be possible, but is not anymore; We'd really appreciate having the option to not forward to another action in this case (and thereby allowing setting the installToolPassword to "", but not allowing a login without a valid installToolPassword); having a feature toggle would be perfect
  26. Mogens Fiebrandt commented on patch set 6 CR 0 V 0 05/31/24, 19:35

    Reply

    @mathias.bolt.lesniak@typo3.org Maybe you could also here use the {isBackendContext} variable in your Template and only show the password hash tool to authenticated systemMaintainers.
  27. Mathias Bolt Lesniak commented on patch set 6 06/01/24, 12:49

    Maintenance.php:101 Reply

    Sounds like a good idea, but it should probably be implemented in a separate patch.
  28. Mathias Bolt Lesniak uploaded patch set 7 V +1 06/10/24, 08:18

  29. core-ci voted on patch set 7 V +1 06/10/24, 08:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58979

  30. Mathias Bolt Lesniak commented on patch set 7 06/10/24, 08:24

    Reply

    I think a good solution could be to move the hash generator into a CLI command. That would make it possible for someone with server permissions to easily generate the hash without making it a public-facing feature. It would also be easy to explain in the error message. @derhansen@gmail.com @oliver.hader@typo3.org

    ShowLogin.html:54 Reply

    Resolved in patchset 7

    ShowNoInstallToolPassword.html:25 Reply

    Resolved in patchset 7
  31. Patrick Schriner commented on patch set 7 06/10/24, 09:10

    Maintenance.php:101 Reply

    Done
  32. Rozbeh Chiryai Sharahi commented on patch set 7 06/12/24, 12:29

    Reply

    Here I implemented a command-line tool for that purpose https://review.typo3.org/c/Packages/TYPO3.CMS/+/84652 In case you want to use it, let me know and I add some documentation. Here a small man for the command: vendor/bin/typo3 install:password:set (will interactively ask for password [hidden]) vendor/bin/typo3 install:password:set --no-interaction (will auto-gen a password) vendor/bin/typo3 install:password:set --dry (will not update settings.php) vendor/bin/typo3 install:password:set --password=DEFINE_PASS_ON_CALL
  33. Garvin Hicking uploaded patch set 8 V +1 06/15/24, 07:00

  34. core-ci voted on patch set 8 V +1 06/15/24, 07:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59636

  35. Mathias Bolt Lesniak uploaded patch set 9 V +1 06/24/24, 10:25

  36. Mathias Bolt Lesniak commented on patch set 9 06/24/24, 10:27

    Reply

    I have removed the password generator from this patch. Information about the install:password:set command can be included in a separate patch.

    ShowNoInstallToolPassword.html:50 Reply

    @gh@faktor-e.de Do you have additional remarks or can this be marked as resolved?
  37. core-ci voted on patch set 9 V -1 06/24/24, 10:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60167

  38. Garvin Hicking commented on patch set 9 06/24/24, 10:37

    ShowNoInstallToolPassword.html:50 Reply

    Acknowledged
  39. Mathias Bolt Lesniak uploaded patch set 10 V -1 06/24/24, 11:18

  40. core-ci voted on patch set 10 V -1 06/24/24, 11:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60169

  41. Mathias Bolt Lesniak uploaded patch set 11 V -1 06/24/24, 13:41

  42. core-ci voted on patch set 11 V +1 06/24/24, 13:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60177

  43. Mathias Bolt Lesniak uploaded patch set 12 V +1 08/01/24, 18:19

  44. core-ci voted on patch set 12 V +1 08/01/24, 18:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62604

  45. Oliver Hader commented on patch set 12 V +1 08/01/24, 18:56

    Looks good from my side and a security point of view...
  46. Mathias Bolt Lesniak uploaded patch set 13 V +1 08/01/24, 21:17

  47. core-ci voted on patch set 13 V -1 08/01/24, 21:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62666

  48. core-ci voted on patch set 13 V +1 08/02/24, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62666

  49. Markus Klein commented on patch set 13 08/02/24, 11:51

    LoginController.php:39

    this is wrong for the action?
  50. Mathias Bolt Lesniak uploaded patch set 14 V +1 08/02/24, 12:05

  51. core-ci voted on patch set 14 V +1 08/02/24, 12:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62726

  52. Mathias Bolt Lesniak commented on patch set 14 08/02/24, 12:13

    LoginController.php:39 Reply

    Ah, that's embarrassing. Now fixed.
  53. Garvin Hicking commented on patch set 14 08/13/24, 14:56

    DefaultConfigurationDescription.yaml:207

    Duplicate "the the"

    Maintenance.php:90

    Is it a conscious decission to use makeInstance here (performance? container-related?) instead of using CPP for this service in the constructor?

    ShowLogin.html:59

    (Unsure if just a mobile gerrit view issue, but indentation seems to be missing one level here?)
  54. Mathias Bolt Lesniak uploaded patch set 15 V +1 08/14/24, 06:31

  55. Mathias Bolt Lesniak commented on patch set 15 08/14/24, 06:38

    DefaultConfigurationDescription.yaml:207 Reply

    Thanks for noticing. I have corrected this in patchset 15.

    Maintenance.php:90 Reply

    This is a conscious decision. Since a missing Install Tool password is an uncommon occurrence, I thought it was best to refrain from always initializing the Features class. I haven't measured the performance impact, though. 😊

    ShowLogin.html:59 Reply

    Indeed! Good catch! Resolved in patchset 15.
  56. core-ci voted on patch set 15 V +1 08/14/24, 06:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63357

  57. Markus Klein commented on patch set 15 08/18/24, 18:55

    Maintenance.php:90 Reply

    Performance is not a topic here. PHP evaluates the first part of the AND condition and if this is already `false` it won't even bother with the remaining condition part.
  58. Markus Klein voted on patch set 15 CR +1 08/18/24, 18:57

  59. Simon Praetorius voted on patch set 15 CR +1 V +1 09/17/24, 18:09

  60. Markus Klein voted on patch set 15 V +1 09/18/24, 20:31

  61. Guido Schmechel commented on patch set 15 10/03/24, 09:09

    Maintenance.php:93

    Technically, the patch works for me. But can't we optimise the output a little for this error case? So maybe in style, like the new error file?
  62. Mathias Bolt Lesniak commented on patch set 15 10/03/24, 09:46

    Maintenance.php:93 Reply

    Hi Guido! Thank you for your input. Previous feedback indicated that the users who want this error message also desire the lowest possible resource usage, thus I kept the old error handling. I'm choosing to mark your comment as resolved, as it's not directly relevant for this patch, and it can be implemented in a separate patch later where this topic can be explored in full. 🙂
  63. Guido Schmechel commented on patch set 15 CR +1 V +1 10/03/24, 10:21

    Maintenance.php:93 Reply

    Fine for me :-)
  64. Radostin Milenov uploaded patch set 16 CR +1 V +1 08/03/26, 18:11

  65. core-ci voted on patch set 16 V -1 08/03/26, 18:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105899

  66. Stefan Bürk uploaded patch set 17 V -1 08/03/26, 18:44

  67. core-ci voted on patch set 17 V -1 08/03/26, 18:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105901

  68. Radostin Milenov uploaded patch set 18 V -1 08/04/26, 06:31

  69. Simon Praetorius wrote 08/04/26, 06:35

    Removed reviewer Simon Praetorius.
  70. core-ci voted on patch set 18 V +1 08/04/26, 06:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105924

  71. Radostin Milenov commented on patch set 18 V +1 08/04/26, 06:41

    Fixed the conflicts and tweaked style just a bit.
  72. Riccardo De Contardi commented on patch set 19 V +1 08/06/26, 07:17

    Published edit on patch set 18.
  73. Riccardo De Contardi commented on patch set 19 08/06/26, 07:18

    I changed the description wording for consistency
  74. core-ci voted on patch set 19 V +1 08/06/26, 07:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105994

  75. Radostin Milenov voted on patch set 19 CR +1 V +1 08/06/26, 07:26

  76. Radostin Milenov uploaded patch set 20 CR +1 V +1 08/06/26, 14:53

  77. Radostin Milenov commented on patch set 20 08/06/26, 14:58

    Small wording adjustment to "Allow insecure Site resolution" toggle description.
  78. core-ci voted on patch set 20 V +1 08/06/26, 15:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106001

  79. Riccardo De Contardi commented on patch set 21 V +1 08/06/26, 17:00

    Published edit on patch set 20.
  80. Riccardo De Contardi commented on patch set 21 08/06/26, 17:01

    Edited the error message to avoid a tone that seems to put the blame on the user with
  1. core-ci voted on patch set 21 V +1 08/06/26, 17:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106009

  2. Radostin Milenov voted on patch set 21 CR +1 V +1 08/06/26, 18:35

  3. Markus Klein commented on patch set 21 08/07/26, 17:54

    Maintenance.php:112

    I'd extract this into a variable, as we have the exact same check twice now.

    ShowNoInstallToolPassword.html:22

    Is this the correct permalink?
  4. Riccardo De Contardi commented on patch set 21 08/11/26, 09:15

  5. Mathias Bolt Lesniak commented on patch set 21 08/11/26, 11:29

    ShowNoInstallToolPassword.html:22 Reply

    The correct link would be the permalink: https://docs.typo3.org/permalink/t3start:start
  6. Radostin Milenov commented on patch set 21 08/11/26, 11:34

    I just had a quick talk with Garvin about it. Do we actually need a feature toggle for this. I mean we just improve the instructions and make it a bit prettier. That should be enough right ?

    Maintenance.php:112 Reply

    Probably yes. $installTollPasswordIsEmpty? $installTollPasswordIsSet ? I've prepared the patch, just need an input on the variable name.

    ShowNoInstallToolPassword.html:22 Reply

    Yes it is.
  7. Markus Klein commented on patch set 21 08/18/26, 21:49

    Maintenance.php:112 Reply

    `installTollPasswordIsSet` seems good.
  8. Sebastian Fischer voted on patch set 21 CR +1 08/21/26, 09:23

  9. Markus Klein commented on patch set 21 08/24/26, 12:41

    Reply

    I'm not so sure about the feature toggle either. Not sure about the reasoning behind that.
  10. Radostin Milenov commented on patch set 21 09/16/26, 12:19

    Reply

    Let's scrap it then, main target hier is to improve the instructions, so let us stick to that
  11. Markus Timtner voted on patch set 21 CR +1 10/20/26, 17:50

  12. Markus Timtner voted on patch set 21 V +1 10/20/26, 17:50

  13. Markus Timtner commented on patch set 21 10/20/26, 17:52

    Reply

    should be resolved now, then.
  14. Josua Vogel commented on patch set 21 10/22/26, 20:21

    Reply

    No, the feature toggle is still in the patch. I'd rather do without it, too.
  15. Benni Mack uploaded patch set 22 CR +1 V +1 11/13/26, 11:29

  16. core-ci voted on patch set 22 V +1 11/13/26, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114311

  17. Benni Mack commented on patch set 22 11/13/26, 11:43

    Reply

    removed it
  18. Josua Vogel voted on patch set 22 CR +1 V +1 11/13/26, 12:33

  19. Simon Schaufelberger commented on patch set 22 11/14/26, 20:39

    ShowNoInstallToolPassword.fluid.html:26

    please make the path depending on the environment. In Composer environment this is usually vendor/bin/typo3.
  20. Benni Mack uploaded patch set 23 CR +1 V +1 11/18/26, 18:25

  21. core-ci voted on patch set 23 V +1 11/18/26, 18:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114900

  22. Benni Mack commented on patch set 23 CR +1 V +1 11/18/26, 19:21

    ShowNoInstallToolPassword.fluid.html:26 Reply

    Done
  23. Simon Schaufelberger voted on patch set 23 CR +1 V +1 11/18/26, 19:23

  24. Garvin Hicking voted on patch set 23 CR +2 V +2 11/18/26, 19:40

  25. Garvin Hicking merged patch set 24 11/18/26, 19:41