Issue
- When any user logs into the portal, they see the user profile of another user instead of seeing their own profile.
Environment
- Liferay DXP 7.0
Resolution
-
There are usually two root causes for the reported behavior:
1. Session ID conflict, and
2. Incorrect cache configuration.-
Addressing 1, the session is identified by the JSESSIONID which is generated by the application server. It is highly unlikely that two users get the same JSESSSIONID (certainly much more unlikely than one in a thousand), so there is the possibility of:
- Session ID conflict between application servers - while it's true that an app server more or less guarantees that the JSESSIONIDs are unique, there's no such guarantee when another app server is also producing Session IDs, though the chances of matching JSESSIONIDs should still be very low. That said, it could be a possibility when there's a cluster and there's no sticky sessions or session replication at the load balancer and application server level, respectively.
- Addressing 2, the caching, this situation could arise with a web server that aggressively caches pages of logged-in users and serves these to other users as well.
- Please note that neither of the above cases is caused as a result of an incorrect configuration or business logic of Liferay itself.
-
Addressing 1, the session is identified by the JSESSIONID which is generated by the application server. It is highly unlikely that two users get the same JSESSSIONID (certainly much more unlikely than one in a thousand), so there is the possibility of:
Additional Information
The above behavior is observed with the involvement of a third-party application.