90065[FEATURE] Add password hashing option to SaveToDatabase finisher
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Sven Liebert +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Garvin Hicking +2
- Sven Liebert +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/14.0/Feature-106752-AddPasswordHashingOptionToSaveToDatabaseFinisher.rstnew+37 −0
- typo3/sysext/form/Classes/Domain/Finishers/SaveToDatabaseFinisher.php8+10 −0
- typo3/sysext/form/Documentation/D/FinisherOptions/Index.rst+21 −0
- typo3/sysext/form/Documentation/I/Config/proto/finishersDefinition/finishers/SaveToDatabase.rst+28 −0
- typo3/sysext/form/Tests/Unit/Domain/Finishers/SaveToDatabaseFinisherTest.php+22 −0
Review log 2125
-
Josua Vogel uploaded patch set 1 07/14/25, 18:04
-
core-ci voted on patch set 1 V -1 07/14/25, 18:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81696
-
Josua Vogel uploaded patch set 2
V -107/14/25, 18:16 -
core-ci voted on patch set 2 V +1 07/14/25, 18:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81700
-
Garvin Hicking commented on patch set 2 07/14/25, 18:47
Could you also imeplement this to: * typo3/sysext/form/Documentation/D/FinisherOptions/Index.rst -> L843 ff * typo3/sysext/form/Documentation/I/Config/proto/finishersDefinition/finishers/SaveToDatabase.rst -> L228 ff -
Josua Vogel uploaded patch set 3
V +107/15/25, 05:58 -
Josua Vogel commented on patch set 3 07/15/25, 05:59
Reply
Done -
core-ci voted on patch set 3 V +1 07/15/25, 06:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81720
-
Mathias Brodala commented on patch set 3 CR -1 07/15/25, 06:08
I'd rather introduce a dedicated finisher which takes an arbitrary value (runtime reference) and provides a finisher variable. This can then be used in any other finisher including the SaveToDatabase finisher. We should stick to KISS and not start packing too much stuff in the existing finishers. -
Josua Vogel commented on patch set 3 07/15/25, 06:25
Reply
Wouldn't that make an integrator's life more difficult? He has to add another finisher before the SaveToDatabase finisher so that he can save a password securely. The SaveToDatabase finisher already offers modifications for file references and date - in my opinion, another option for hashing doesn't break the camel's back and makes things easier for the integrator. -
Sven Liebert commented on patch set 3 07/15/25, 06:36
Reply
I would say that is against KISS to chain the finishers here. Because in my opinion than it's not foolproof anymore. -
Mathias Brodala commented on patch set 3 07/15/25, 06:42
Reply
If that's the goal then we'd need a single finisher for everything. ;-) Also think about future changes. Now we'd have "hashed: true", the next one wants "lowercased: true", "rot13: true", etc. This is a never ending story. IMO composition is better suited here. -
Josua Vogel commented on patch set 3 07/15/25, 06:56
Reply
From that perspective, you're right. I thought we were taking our cues from TCA options to reuse familiar patterns. There is hashed as a boolean option and your examples would fall under “eval” ;) If the SaveToDatabase finisher ever gets a frontend, there would be a challenge for the editor to place another finisher upstream. I don't want to make TYPO3 too complicated for the user. We can wait and see what someone else thinks, e.g. @garvin@hick.ing -
Garvin Hicking commented on patch set 3 07/15/25, 07:14
Reply
I understand both takes. I personally think though the current implementation is acceptable as it doesn't overly complicate things and is ready now for usage, especially given that the finisher now also already takes care of date/file conversions too. The fe_user case could be common for form registrations. And given the existing core finishers, most of these can perform functionality on their own; a finisher that pre-processes input only for transformation and nothing else is not existing yet. The others all "do something", like "save", "send mail", "show flash message", "delete uploaded files", "redirect". I do like the appeal of unix-like piping, but I think for integrators it would be easier to just set this flag than to insert new finishers. The code complexity isn't increasing by that much to force splitting it up (3 loc) IMO. -
Mathias Brodala commented on patch set 3 07/15/25, 07:22
SaveToDatabaseFinisher.php:263Shorter: ``` $elementsConfiguration[$elementIdentifier]['hashed'] ?? false === true ```SaveToDatabaseFinisher.php:265Can/should we handle the possible "null" value on empty password? -
Mathias Brodala commented on patch set 3 07/15/25, 07:23
Reply
OK, fine with me then. Piping is a good keyword and something to consider for future changes. (Already did something like this in one project.) -
Josua Vogel uploaded patch set 4
CR -1V +107/15/25, 08:22 -
Mathias Brodala commented on patch set 4 07/15/25, 08:26
SaveToDatabaseFinisher.php:263ReplyDoneSaveToDatabaseFinisher.php:265ReplyDone -
Josua Vogel commented on patch set 4 07/15/25, 08:27
SaveToDatabaseFinisher.php:263ReplyDone, thx!SaveToDatabaseFinisher.php:265ReplyYes, if the value is null, you get an exception, while inserting. I added a check to only hash the value if it´s not empty/null. -
core-ci voted on patch set 4 V +1 07/15/25, 08:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81725
-
Garvin Hicking commented on patch set 4 CR +1 V +1 07/16/25, 07:15
SaveToDatabaseFinisher.php:263ReplyDoneSaveToDatabaseFinisher.php:265ReplyDone -
Sven Liebert voted on patch set 4 CR +1 V +1 07/17/25, 09:28
-
Simon Schaufelberger voted on patch set 4 CR +1 V +1 07/18/25, 00:10
-
Garvin Hicking voted on patch set 4 CR +2 V +2 07/18/25, 14:35
-
Garvin Hicking merged patch set 5 07/18/25, 14:36