Logging the oldest user out on collision doesn't respect ignoring masquerade

Created on 21 August 2024, 5 months ago

Problem/Motivation

Say you have a session limit of 2, two active real sessions, and one active masqueraded session. If one more session shows up for that user, the oldest real session should be logged out, but currently, both real sessions are logged out, as the masqueraded session counts as one of the two allowed.

Steps to reproduce

Set session limit to 2 (or more, but this makes testing easier).
Set behaviour to log out oldest session, and ignore masquerade.
Log in enough sessions to fill the limit.
Masquerade as that user (this should log none of them out, and it does)
Log in one additional session (this should log out one session, but it logs out two)

Proposed resolution

Add the masquerade consideration code to the logout function

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

I've uploaded patches for both 2.x and 2.0.x so that this can be committed and also used as a patch in the interim

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom cameronwelch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024