Got an internal error when re-creating a CWUser and trying to connect with a previously set cookie
Step to reproduce
- Create an instance
- Create a user
toto
- Log in with
toto
- Re-create the instance from stratch
- Re-create the user
toto
(make sure the eid of the created user is ≠ than the one created at step 2, may be create some additional entities).
If the cookie created a step 3 is still there, them you may experience an Internal Server Error, as the eid in the cookie does not refer anymore to the user toto
.
The assert
causing the Internal Server Error is this one. Instead of failing, we could invalidate the cookie and redirect to /login.