Bug #91970
closedTCA eval saltedPassword can return null, behaving different than the old BackendEvaluator of ext:saltedpasswords which only returned string, leading to SQL errors
0%
Description
We have a custom field that uses the ext:saltedpasswords
BackendEvaluator
TCA validation to create salted passwords on a custom field.
After upgrading to v9 we switched to saltedPassword
evaluation. This works for required fields, but not for optional fields in case an empty password is provided.
The old evaluator just returned the empty string if the entered password was empty. The new saltedPassword
evaluation returns null
however for empty strings. Which can lead to SQL errors if the column is defined as NOT NULL
.
Our workaround is to explicitly trim
after saltedPassword
:
'eval' => 'password, saltedPassword, trim'
Either the new eval should be changed to return ?? ''
or the new behaviour must be documented in the TCA docs.
(We use pbkdf2 if this matters.)