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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2