Review main Merged

88416[BUGFIX] Handle empty, not-nullable passwords on record copy

Garvin Hicking CR +2 V +2 Easy +7 −0 updated 03/10/25, 18:53

Commit message

By default, TCA `type=password` columns are set as `NOT NULL`
in the database (`config['nullable'] = false`).

When copying a record through FormEngine, an empty password
will be evaluated as `NULL` and the new record will inserted
as such, leading to an SQL failure "Column 'passwordfield' cannot
be null".

This patch checks on the nullable definition of a password field,
and in case of a NULL value converts it to an empty string, just
like when getting created through FormEngine (instead of copied).

This can be reproduced with EXT:styleguide when copying an
empty record of type "elements basic".

Review

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

Issues 1

Files 1

Review log 56

  1. Garvin Hicking uploaded patch set 1 02/28/25, 19:13

  2. core-ci voted on patch set 1 V +1 02/28/25, 19:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74919

  3. Oli Bartsch voted on patch set 1 CR +1 V +1 03/03/25, 10:23

  4. Benni Mack voted on patch set 1 CR +1 V +1 03/10/25, 16:22

  5. Garvin Hicking voted on patch set 1 CR +2 V +2 03/10/25, 18:52

  6. Garvin Hicking merged patch set 2 03/10/25, 18:53