Review main Merged

67218[TASK] Increase session id db field size

Christian Kuhn CR +2 V +2 Easy +2 −2 updated 01/07/21, 11:31

Commit message

Since one of the recent security patches, frontend and
backend user sessions are stored as HMAC-SHA256 if using
redis storage backend, and HMAC-MD5 if using default
database storage backend.

Reason for using the less collision resistant md5 in
database backend over sha256 has been, that the 64
characters of sha256 did not fit into the varchar(32)
field of the ses_id fields. This would have led to
trouble for users upgrading to the security patch level
releases.

We now increase the field size to varchar(255) with this
patch, and backport this to v10. A second patch will then
switch only v11/master to sha256. This way, users
can increase db field size in v10 already to prepare for
v11 and later upgrade to v11 without being logged out or
experiencing db errors. Only users running current
master will have to use the standalone install tool once
to increase field size.

Strictly, a field size of 64 characters would be enough
for sha256, we however raise to 255 to never run into
this chicken-egg issue again - just in case.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Oliver Klee +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 89

  1. Christian Kuhn uploaded patch set 1 12/21/20, 10:08

  2. TYPO3com voted on patch set 1 V +1 12/21/20, 10:18 Completed build in 09m 59s on Mon, 21 Dec, 10:18 AM Test Summary: 32528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8368

  3. Oliver Hader voted on patch set 1 CR +1 12/21/20, 10:38

  4. Benni Mack voted on patch set 1 CR +2 12/21/20, 10:39

  5. Oliver Klee voted on patch set 1 CR +1 12/21/20, 10:57

  6. Oli Bartsch voted on patch set 1 V +1 CR +1 12/21/20, 11:28

  7. Benni Mack voted on patch set 1 V +2 12/21/20, 12:18

  8. Benni Mack merged patch set 2 12/21/20, 12:18

  9. Ingo Fabbri commented on patch set 2 01/07/21, 11:31

    Please use the right size for it. It is HMAC-MD5 right now I guess, it will be sha256 somewhen. So please use VARCHAR(64) and not 255, not 190 (to mitigate additional mb4 bytes).