51740[SECURITY][FEATURE] Cleanup saltedpasswords api and add a new salt
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 2
Files 25
- typo3/sysext/core/Documentation/Changelog/master/Breaking-79889-SaltedpasswordsSaltAPIChanges.rst.rstnew+53 −0
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-79889-DeprecatedUsageOfCustomSalts.rstnew+39 −0
- typo3/sysext/core/Documentation/Changelog/master/Feature-79889-SaltedpasswordsSupportPHPPasswordAPI.rstnew+39 −0
- typo3/sysext/saltedpasswords/Classes/Exception/InvalidSaltValueException.php3new+21 −0
- typo3/sysext/saltedpasswords/Classes/Salt/AbstractComposedSalt.php10renamed+16 −1
- typo3/sysext/saltedpasswords/Classes/Salt/AbstractPhpPasswordHashSalt.php4new+165 −0
- typo3/sysext/saltedpasswords/Classes/Salt/Md5Salt.php+4 −1
- typo3/sysext/saltedpasswords/Classes/Salt/Pbkdf2Salt.php+4 −1
- typo3/sysext/saltedpasswords/Classes/Salt/PhpassSalt.php+4 −1
- typo3/sysext/saltedpasswords/Classes/Salt/PhpPasswordHashBcryptSalt.php6new+168 −0
- typo3/sysext/saltedpasswords/Classes/Salt/SaltFactory.php+5 −4
- typo3/sysext/saltedpasswords/Classes/Salt/SaltInterface.php+0 −15
- typo3/sysext/saltedpasswords/Classes/SaltedPasswordService.php+1 −1
- typo3/sysext/saltedpasswords/Documentation/DevelopersGuide/Index.rst+11 −3
- typo3/sysext/saltedpasswords/Migrations/Code/ClassAliasMap.phpnew+4 −0
- typo3/sysext/saltedpasswords/Resources/Private/Language/locallang.xlf+6 −3
- typo3/sysext/saltedpasswords/Tests/Unit/Fixtures/PhpPasswordHashUndefinedAlgorithmSalt.phpnew+55 −0
- typo3/sysext/saltedpasswords/Tests/Unit/Fixtures/PhpPasswordHashUndefinedHashLengthSalt.phpnew+55 −0
- typo3/sysext/saltedpasswords/Tests/Unit/Fixtures/PhpPasswordHashUndefinedSettingPrefixSalt.php5new+55 −0
- typo3/sysext/saltedpasswords/Tests/Unit/Salt/AbstractPhpPasswordHashSaltTest.php3new+198 −0
Review log 3953
Show 1928 earlier messages
-
Christian Futterlieb uploaded patch set 1 02/18/17, 14:43
-
TYPO3com voted on patch set 1 V -1 02/18/17, 14:57 Completed build in 13m 53s on Sat, 18 Feb, 03:57 PM Test Summary: 2 of 56527 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8221
-
TYPO3com commented on patch set 1 02/18/17, 15:01 Completed build in 31m 46s on Sat, 18 Feb, 04:01 PM Test Summary: 56527 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8221
-
Christian Futterlieb uploaded patch set 2 02/18/17, 21:44
-
TYPO3com voted on patch set 2 V -1 02/18/17, 21:51 Completed build in 07m 25s on Sat, 18 Feb, 10:51 PM Test Summary: 56451 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8238
-
Christian Futterlieb uploaded patch set 3 02/18/17, 22:15
-
TYPO3com voted on patch set 3 V -1 02/18/17, 22:24 Completed build in 08m 14s on Sat, 18 Feb, 11:24 PM Test Summary: 56451 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8242
-
Christian Futterlieb commented on patch set 3 02/18/17, 22:36
> Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8242 Hi there! Can anyone please tell me what's going wrong there in the tests "Accept php70 my .."? I don't get it.. -
Christian Futterlieb updated the commit message in patch set 4 02/18/17, 22:39
-
TYPO3com voted on patch set 4 V -1 02/18/17, 22:46 Completed build in 06m 04s on Sat, 18 Feb, 11:46 PM Test Summary: 56451 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8244
-
Christian Kuhn rebased onto patch set 5 02/18/17, 23:00
-
TYPO3com voted on patch set 5 V -1 02/18/17, 23:12 Completed build in 11m 54s on Sun, 19 Feb, 12:12 AM Test Summary: 1 of 56526 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8246
-
TYPO3com voted on patch set 5 V +1 02/18/17, 23:15 Completed build in 27m 28s on Sun, 19 Feb, 12:15 AM Test Summary: 56526 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8246
-
Philipp Gampe commented on patch set 5 CR -1 02/23/17, 14:26
we are past feature freeze, this can go into v9 -
Benni Mack commented on patch set 5 CR -1 04/21/17, 14:32
Renaming a PHP class is breaking, otherwise just introduce a ClassAlias legacy mapper and you're good to go. Christian F. can you take care of that? -
Oliver Klee commented on patch set 5 04/21/17, 14:57
AbstractComposedSalt.php:58Can we please have return types for all new methods? -
Christian Futterlieb commented on patch set 5 04/22/17, 13:34
@Benni Mack: Yes, I'll take careAbstractComposedSalt.php:58ReplySure. Should I add the return types for the 'old' methods as well? Imo we could take the chance as the class name change is breaking anyway, we'd just have to extend the rst. What do you mean? -
Oliver Klee commented on patch set 5 04/22/17, 13:36
AbstractComposedSalt.php:58ReplyI'd prefer to have this in a separate clean-up change so cleanup and and new feature are separate. -
Christian Futterlieb commented on patch set 5 04/22/17, 13:38
AbstractComposedSalt.php:58Replyok -
Christian Futterlieb uploaded patch set 6 05/05/17, 14:51
-
Christian Futterlieb commented on patch set 6 05/05/17, 14:52
note: patchset 6 is only a rebase on current master -
TYPO3com voted on patch set 6 V -1 05/05/17, 14:57 Completed build in 06m 05s on Fri, 5 May, 04:57 PM Test Summary: 55944 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11232
-
Jan Helke uploaded patch set 7 05/05/17, 15:09
-
TYPO3com voted on patch set 7 V +1 05/05/17, 15:15 Completed build in 06m 04s on Fri, 5 May, 05:15 PM Test Summary: 55944 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11233
-
Oliver Klee commented on patch set 7 05/05/17, 15:15
AbstractComposedSalt.php:58As we are PHP-7-only now, I propose having return type hints (and type hints for basic types like string).AbstractPhpPasswordHashSalt.php:47All these fields should have default values of the correct type.PhpPasswordHashBcryptSalt.php:21This class deserves some documentation.PhpPasswordHashBcryptSalt.php:48We can use int[] here to help static code analysis. -
Christian Futterlieb commented on patch set 7 05/05/17, 15:18
AbstractComposedSalt.php:58ReplyYes, you have mentioned it before (in ps 5), I'm on it ;-) -
Oliver Klee commented on patch set 7 05/05/17, 15:25
AbstractComposedSalt.php:58ReplyThanks! <3 -
Christian Futterlieb commented on patch set 7 05/05/17, 15:25
AbstractComposedSalt.php:58Reply@Oliver Klee: As this class is the successor of AbstractSalt, every existing salt class must change its methods as well to stay compatible. Is this a no-go (breaking) or not?
-
Christian Futterlieb commented on patch set 7 05/05/17, 15:29
AbstractComposedSalt.php:58ReplyFor clarification: these two methods were in SaltInterface before -
Oliver Klee commented on patch set 7 05/05/17, 15:30
AbstractComposedSalt.php:58ReplyOh, then we shouldn't change it. (I'm not sure about the official workflow for changing interfaces like this.) -
Christian Futterlieb commented on patch set 7 05/05/17, 15:53
AbstractPhpPasswordHashSalt.php:47ReplyWhy? As every hashing method will inherently have its own specifications, it therefor must declare them itself. Default values do not make any sense imho. I think it's a better idea to check the values before using them, for example in isValidSaltedPW()PhpPasswordHashBcryptSalt.php:21ReplyYep, I'll add itPhpPasswordHashBcryptSalt.php:48ReplyI'm just curious: isn't this a problem with an associative array? -
Oliver Klee commented on patch set 7 05/05/17, 15:58
AbstractPhpPasswordHashSalt.php:47ReplyThe idea is that you then can rely on the fields having a value of the delared type no matter where in the program flow you are. This will make the type declaration "always correct", and the reader does not need to know that there are exceptions to the type (that are not documented in the @var).PhpPasswordHashBcryptSalt.php:48ReplyNo. The type[] declaration only is a statement about the values, not about the keys. -
Christian Futterlieb commented on patch set 7 05/05/17, 16:07
AbstractPhpPasswordHashSalt.php:47ReplyI agree, less type-juggling is better.. I'll define some defaults and add regarding checks in the code.PhpPasswordHashBcryptSalt.php:48ReplyOk, thx =) -
Christian Futterlieb uploaded patch set 8 05/08/17, 11:17
-
TYPO3com voted on patch set 8 V -1 05/08/17, 11:17 Completed build in 06s on Mon, 8 May, 01:17 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11266
-
Oliver Klee commented on patch set 8 05/08/17, 11:32
InvalidSaltValueException.php:20I think this class deserves a more specific base class. Would RuntimeException be a good fit?PhpPasswordHashUndefinedSettingPrefixSalt.php:24@var missing for both (also in the other parallel classes)PhpPasswordHashUndefinedSettingPrefixSalt.php:28@return (also in the other parallel classes)PhpPasswordHashUndefinedSettingPrefixSalt.php:40This should be string, not mixed (also as type hint, if possible). (also in the other parallel classes)AbstractPhpPasswordHashSaltTest.php:57@param missing (also for the other tests that use data providers)AbstractPhpPasswordHashSaltTest.php:67@return and return type hinting missing: array (also for the other tests that use data providers)AbstractPhpPasswordHashSaltTest.php:80Please let's have a comma after the last array element. This makes adding a new line without modifying the existing lines possible. -
Christian Futterlieb commented on patch set 8 05/08/17, 12:35
I'll fix the other mentioned issues in a minuteInvalidSaltValueException.php:20ReplyI decided to use Exception, because there is no "ClassVarsNotProperlyDefinedException". Imo it's not a RuntimeException, I'd go for LogicException (or even ErrorException) instead.PhpPasswordHashUndefinedSettingPrefixSalt.php:40ReplyYes, it should (to set a correct $settingPrefix), that's true. But in the scope of the test (and that is what this class is all about) it's used to assign all the values that won't fit, see AbstractPhpPasswordHashSaltTest::invalidSettingPrefixDataProvider() -
Christian Futterlieb uploaded patch set 9 05/08/17, 12:37
-
TYPO3com voted on patch set 9 V -1 05/08/17, 12:37 Completed build in 05s on Mon, 8 May, 02:37 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11267
-
Oliver Klee commented on patch set 9 05/08/17, 14:01
The build failure seems to be related to the composer.json. Maybe a rebase to the current master will solve this? -
Oliver Klee commented on patch set 9 05/08/17, 14:03
Oh, it looks like you need to update the composer.json of the TYPO3 Core. -
Oliver Klee commented on patch set 8 05/08/17, 14:06
InvalidSaltValueException.php:20ReplyLogicException sounds good to me.PhpPasswordHashUndefinedSettingPrefixSalt.php:40ReplyAh, okay. Sounds fair. :-) -
Christian Futterlieb commented on patch set 9 05/08/17, 14:08
> Oh, it looks like you need to update the composer.json of the TYPO3 > Core. Yes, I did, because of the registration of the ClassAliasMap.php. Do I have to commit the composer.lock as well, maybe? -
Christian Futterlieb uploaded patch set 10 05/08/17, 14:15
-
TYPO3com voted on patch set 10 V -1 05/08/17, 14:16 Completed build in 05s on Mon, 8 May, 04:16 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11268
-
Oliver Klee commented on patch set 10 05/08/17, 15:44
Yes, you'll need to update and commit the Core composer.lock as well.composer.json:80Please use tabs for indentation for the new lines so the indentation is consistent with the rest of the file. -
Christian Futterlieb uploaded patch set 11 05/08/17, 15:51
-
TYPO3com voted on patch set 11 V -1 05/08/17, 15:56 Completed build in 05m 39s on Mon, 8 May, 05:56 PM Test Summary: 12 of 56187 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11270
-
Christian Futterlieb uploaded patch set 12 05/08/17, 16:09
-
TYPO3com voted on patch set 12 V -1 05/08/17, 16:15 Completed build in 05m 40s on Mon, 8 May, 06:15 PM Test Summary: 56178 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11271
-
Christian Futterlieb abandoned the change 05/08/17, 18:00
Abandon this change to split it up in smaller separate changes. the first one is: https://review.typo3.org/52737 -
Christian Futterlieb commented on patch set 12 05/08/17, 18:20
Second split task: https://review.typo3.org/52738 I can push the third one as soon as the first (https://review.typo3.org/52737) is merged -
Christian Futterlieb commented on patch set 12 02/22/18, 13:28
fyi: 3rd and last split task (introduce the new salt classes): https://review.typo3.org/55668