RE: Redirect is not allowed and other problems

JAVIER CACERES GONZALEZ, modified 4 Years ago. New Member Posts: 5 Join Date: 11/21/19 Recent Posts
Dear all,
I’m receiving this warning messages in my second Liferay virtual instance:
2020-09-24 08:00:52.333 WARN [ajp-nio-127.0.0.1-8009-exec-6][PortalImpl:1036] Redirect URL https://.. ?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1 is not allowed
Also I have more problems:
1. The navigation around the portal is not fine in diferent situations.
2. Back buttons don’t work properly.
3. I have problems with permissions and I’m the root. For example, I receive “You don’t have enought privileges to do … “ when I change the styles for a portlet.

I’ve checked all liferay properties and it seems they are ok: 
redirect.url.security.mode=ip
redirect.url.domains.allowed=
redirect.url.ips.allowed=127.0.0.1,SERVER_IP
It seems this is known issue: https://help.liferay.com/hc/es/articles/360033277192-Errores-en-el-archivo-de-log-del-tipo-Redirect-URL-is-not-allowed-y-otros-s%C3%ADntomas-aleatorios
Do you know how to fix all these problems? I’m using Liferay 7.3.3.
Thank you very much for your time.
Kind regards,
thumbnail
Christoph Rabel, modified 4 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
You should update those properties to allow your domain name(s).
redirect.url.security.mode=domain
redirect.url.domains.allowed=yourdomain.com,yourseconddomain.com,...
Note: To allow all subdomains of a domain, just write: *.yourdomain.com
I am not sure if the second issue with the permissions is related.
JAVIER CACERES GONZALEZ, modified 4 Years ago. New Member Posts: 5 Join Date: 11/21/19 Recent Posts
Thank you very much for your quick response Christoph.I will try it and I'll let you you the result.Have a nice day.Javier
JAVIER CACERES GONZALEZ, modified 4 Years ago. New Member Posts: 5 Join Date: 11/21/19 Recent Posts
Hi Christoph,
Good news. It seems all problems have been fixed magically and the warning message has disapeared.
I've changed the configuration as you said and I've allowed all domains and subdomains for all virtual instances:
redirect.url.security.mode=domain
redirect.url.domains.allowed=*.com,*.*.com
It seems it's working fine ;)
Now the problem is when I try to access to the server directly with its IP: the same warning problem but now its assumible.
Could we allow both of them? I suppose the response is "no, it is not" because we need to specify "ip" or "domain".
As I said, thank you ery much for your help.
thumbnail
Christoph Rabel, modified 4 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
I hope this is just some internal testsystem. Please note that this setting is there for a reason, redirects to unknown hosts are pretty dangerous from a security point of view. It is far better to configure a correct list of your hosts or maybe your company domain. Allowing all *.com URLs completely defeats the purpose of this setting.
And you are right, the answer is no, since it is IP or domain.
JAVIER CACERES GONZALEZ, modified 4 Years ago. New Member Posts: 5 Join Date: 11/21/19 Recent Posts
It is just a test.
I will configure as you said in production env.
Thank you very  much again.
Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 11/8/21 Recent Posts

Hello,

Does someone know how to solve this issue in Liferay 7.4? I'm having this exact same error, but it seems that redirect.url.security.mode and redirect.url.domains.allowed ​​​​​​​properties are deprecated in Liferay 7.4, so I'm not sure how to solve it.

 

Kind regards,

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Hi Danielly, it looks like you'll find these settings in 7.4  at System Settings > Content and Data > Pages > Redirect URLs.