Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.0 DXP FP32, 7.0.X, Master
-
7.3.x, 7.2.x, 7.1.x, 7.0.x
-
Committed
-
3
-
3
Description
This is a usability problem with a difficult to diagnose error.
When trying to authenticate when cookies are disabled, authentication fails with a broken page and the following warning message is written to the logfile:
[SecurityPortletContainerWrapper:348] User 0 is not allowed to access URL http://SERVER:8080/web/guest/home and portlet com_liferay_login_web_portlet_LoginPortlet
While login obviously has to fail without cookies, the error message is completely misleading and very confusing.
Steps to reproduce - User interface
- Setup Liferay, confirm that login works
- Disable cookies (At least Firefox and Chrome allow you to disable them in the settings)
- Try to login
- Expected result: User is notified that cookies are disabled. Warning message should not appear in logfile.
- Wrong behavior: Login obviously fails. Logfile contains said message
- Expected result: User is notified that cookies are disabled. Warning message should not appear in logfile.
The issue is also reproduced in case the Liferay server receives a request from a bot or a program that doesn't handle the session cookies correctly.
Steps to reproduce - Requesting the login URL
- Setup Liferay, confirm that login works
- Download following URL using wget or curl:
wget "http://localhost:8080/web/guest/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_javax.portlet.action=%2Flogin%2Flogin&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin"
curl "http://localhost:8080/web/guest/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_javax.portlet.action=%2Flogin%2Flogin&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Flogin"
- Check the log file:
- Expected result: There is no warning message in the log file
- Wrong behavior: The warning message User 0 is not allowed to access URL http://localhost:8080/ and portlet com_liferay_login_web_portlet_LoginPortlet: User 0 did not provide a valid CSRF token for com.liferay.portlet.SecurityPortletContainerWrapper is written to the log file
- Expected result: There is no warning message in the log file