構造的に表示 平面上に表示 ツリー上に表示
スレッド数 [ 前へ | 次へ ]
toggle
http:/..../group/control_panel/null error in links Hennie de Villiers 2010/05/11 3:38
RE: http:/..../group/control_panel/null error in links Zsolt Balogh 2010/05/11 7:30
RE: http:/..../group/control_panel/null error in links Hennie de Villiers 2010/05/11 7:47
RE: http:/..../group/control_panel/null error in links David Tompos 2010/06/04 14:05
RE: http:/..../group/control_panel/null error in links Jorge Ferrer 2010/06/15 5:26
RE: http:/..../group/control_panel/null error in links Anton Klein 2010/07/13 12:28
RE: http:/..../group/control_panel/null error in links Jorge Ferrer 2010/07/15 2:38
RE: http:/..../group/control_panel/null error in links Pekka Järveläinen 2010/07/20 23:44
RE: http:/..../group/control_panel/null error in links Jignesh Thakkar 2010/07/29 0:47
RE: http:/..../group/control_panel/null error in links Mani kandan 2011/06/05 23:51
RE: http:/..../group/control_panel/null error in links Cid Moreno Miranda 2011/09/27 17:08
RE: http:/..../group/control_panel/null error in links Tobias Käfer 2010/08/20 2:36
RE: http:/..../group/control_panel/null error in links Ray Augé 2010/08/20 7:50
RE: http:/..../group/control_panel/null error in links William Fleming 2010/09/30 1:20
RE: http:/..../group/control_panel/null error in links Ray Augé 2010/09/30 6:25
SOLVED RE: http:/..../group/control_panel/null error in links Harshal Shah 2010/10/26 9:15
RE: SOLVED RE: http:/..../group/control_panel/null error in links Felipe Sere 2010/10/28 4:57
RE: SOLVED RE: http:/..../group/control_panel/null error in links Zsolt Balogh 2010/10/28 5:07
RE: SOLVED RE: http:/..../group/control_panel/null error in links Harshal Shah 2010/10/28 8:10
RE: SOLVED RE: http:/..../group/control_panel/null error in links Jari Fredriksson 2010/11/26 7:42
RE: SOLVED RE: http:/..../group/control_panel/null error in links Ray Augé 2010/11/26 7:52
RE: SOLVED RE: http:/..../group/control_panel/null error in links Ray Augé 2010/11/26 8:18
RE: SOLVED RE: http:/..../group/control_panel/null error in links Ray Augé 2010/11/26 8:45
RE: SOLVED RE: http:/..../group/control_panel/null error in links Jari Fredriksson 2010/11/26 11:45
RE: SOLVED RE: http:/..../group/control_panel/null error in links benjamin challamel 2010/12/17 7:51
RE: SOLVED RE: http:/..../group/control_panel/null error in links Dana Oredson 2011/01/26 13:48
RE: SOLVED RE: http:/..../group/control_panel/null error in links Ray Augé 2011/01/26 13:51
RE: SOLVED RE: http:/..../group/control_panel/null error in links Tom Thomas 2011/04/13 13:34
RE: SOLVED RE: http:/..../group/control_panel/null error in links Jonas Yuan 2011/01/01 13:02
RE: SOLVED RE: http:/..../group/control_panel/null error in links Dana Oredson 2011/01/26 13:47
RE: SOLVED RE: http:/..../group/control_panel/null error in links Kevin Mui 2011/05/16 9:56
RE: SOLVED RE: http:/..../group/control_panel/null error in links Mani kandan 2011/08/19 0:34
RE: http:/..../group/control_panel/null error in links Mani kandan 2012/09/11 22:33
Hennie de Villiers
http:/..../group/control_panel/null error in links
2010/05/11 3:38
答え

Hennie de Villiers

ランク: Junior Member

投稿数: 75

参加年月日: 2009/04/01

最近の投稿

6.0.1. was installed using a server instance hosted by a java SP, previously used for 5.2.3.

Accessing the new install renders the following issue.

If localhost is used as Virtual Server for the root portal, then links in the control panel such as "Back to Guest" resolves to by example http://locahost/home i.e. results in page not found.

If mydomain.com is used as Virtual Server then the link resolves to http://mydomain.com/home but delivers an error when returning the guest page i.e. The requested resource was not found. http://mydomain.com/group/control_panel/null and links such as Add a team fails to respond.

It seems for issue LPS-7948 that this may possibly be related to configuration but on the other hand it worked fine in 5.2.3.

Looking at LPS-5299 it seems that the same parameter "permissionsURL" is affected.

Is there any correlation between the two and is the problem experienced possibly a bug or a server configuration error?

If a server config error, how can this be resolved
Zsolt Balogh
RE: http:/..../group/control_panel/null error in links
2010/05/11 7:30
答え

Zsolt Balogh

LIFERAY STAFF

ランク: Expert

投稿数: 445

参加年月日: 2009/03/23

最近の投稿

Hi,

This is a security setting, you need to set the redirect.url.* properties in your portal-ext.properties to make this work. Here's the snippet from the portal.properties:

 1##
 2## Redirect
 3##
 4
 5    #
 6    # Set this property to "ip" or "domain" for the redirect security method. If
 7    # set to "domain", the portal will only redirect users to domains listed in
 8    # the property "redirect.url.domain.allowed". If set to "ip", the portal
 9    # will only redirect to domains whose IP address resolve to an IP address
10    # listed in the property "redirect.url.ip.allowed".
11    #
12    #redirect.url.security.mode=domain
13    redirect.url.security.mode=ip
14
15    #
16    # Input a list of comma delimited domains which the portal is allowed to
17    # redirect to. Input a blank list to allow any domain.
18    #
19    redirect.url.domains.allowed=
20
21    #
22    # Input a list of comma delimited IPs which the portal is allowed to
23    # redirect to. Input a blank list to allow any IP. SERVER_IP will be
24    # replaced with the IP of the host server.
25    #
26    redirect.url.ips.allowed=127.0.0.1,SERVER_IP


You'll need to add the ip of the mydomain.com to the redirect.url.ips.allowed list or switch it to domain mode.

Zsolt
Hennie de Villiers
RE: http:/..../group/control_panel/null error in links
2010/05/11 7:47
答え

Hennie de Villiers

ランク: Junior Member

投稿数: 75

参加年月日: 2009/04/01

最近の投稿

Thanks for the input... Much appreciated...
David Tompos
RE: http:/..../group/control_panel/null error in links
2010/06/04 14:05
答え

David Tompos

ランク: New Member

投稿数: 1

参加年月日: 2010/03/20

最近の投稿

I installed 6.0.1 and I am getting the same error. I have made the redirect changes and still have the same problem.


I get this if I click on "add catagory" or "post new thread" in the message board application:

Status Not Found
The requested resource was not found.
http://10.0.2.19:8080/null

Can anyone offer some help? Thanks.
Jorge Ferrer
RE: http:/..../group/control_panel/null error in links
2010/06/15 5:26
答え

Jorge Ferrer

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 2725

参加年月日: 2006/08/31

最近の投稿

Hi David,

Did you apply the solution explained by Zsolt?
Anton Klein
RE: http:/..../group/control_panel/null error in links
2010/07/13 12:28
答え

Anton Klein

ランク: New Member

投稿数: 1

参加年月日: 2010/07/13

最近の投稿

Hi,

I have the same problem, but not in control panel.

My freshly installed Liferay 6.0.2 with default data (no 7cogs) generates wrong urls on "add event" button in Calendar Portlet and in Forum Portlet on "Add Category" button. Redirection settings in portal-ext.properties didn't work.

Best regards, Anton
Jorge Ferrer
RE: http:/..../group/control_panel/null error in links
2010/07/15 2:38
答え

Jorge Ferrer

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 2725

参加年月日: 2006/08/31

最近の投稿

Hi Anton,

Did you also set up the property redirect.url.ips.allowed ? That's the most important one.
Pekka Järveläinen
RE: http:/..../group/control_panel/null error in links
2010/07/20 23:44
答え

Pekka Järveläinen

ランク: New Member

投稿数: 5

参加年月日: 2010/07/19

最近の投稿

In my case it's only a old browser window requesting URL no more exist. Closing the window solves the problem. http://www.liferay.com/community/forums/-/message_boards/message/5368163
Jignesh Thakkar
RE: http:/..../group/control_panel/null error in links
2010/07/29 0:47
答え

Jignesh Thakkar

ランク: New Member

投稿数: 21

参加年月日: 2010/05/09

最近の投稿

I found the same issue and I got successed to resolve this issue.

For resolving this issue you have to set 3 properties in your portal-ext.properties file.

redirect.url.security.mode=ip
redirect.url.domains.allowed=
redirect.url.ips.allowed=127.0.0.1,SERVER_IP.

You can set your ip address instead of SERVER_IP by comma seprated.

Then after starting your liferay server you have to do some settings.

Here I mention the steps to do setting. just follow this.

1) Login as Admin
2) Go to setting -> Control Panel
3) set the virtual host name (like 192.168.100.113 or abc.xyz.com) and then save it.

And you found that you got the solution.
Tobias Käfer
RE: http:/..../group/control_panel/null error in links
2010/08/20 2:36
答え

Tobias Käfer

ランク: Regular Member

投稿数: 128

参加年月日: 2008/03/28

最近の投稿

I stumbled about that thing.
I think there is a problem for resolving the right IP for "SERVER_IP".

The "SERVER_IP" thing is resolved in the constructor of the PortalImpl class:
 1....
 2        _computerName = System.getProperty("env.COMPUTERNAME");
 3
 4        if (Validator.isNull(_computerName)) {
 5            _computerName = System.getProperty("env.HOST");
 6        }
 7
 8        if (Validator.isNull(_computerName)) {
 9            _computerName = System.getProperty("env.HOSTNAME");
10        }
11
12        if (Validator.isNull(_computerName)) {
13            try {
14                _computerName = InetAddress.getLocalHost().getHostName();
15            }
16            catch (UnknownHostException uhe) {
17            }
18        }
19
20        try {
21            _computerAddress = InetAddress.getByName(
22                _computerName).getHostAddress();
23        }
24....


On my system this resolves the IP for "myhost", which is 127.0.0.1. Because this is the normal setting of a linux system in the /etc/hosts file:
1127.0.0.1       localhost myhost

Therefore the SERVER_IP is resolved as "127.0.0.1".

But when a user accesses the portal by "myhost.mydomain.com", the comparison of the IP for "myhost.mydomain.com" (eg. 192.168.0.20) and SERVER_IP (127.0.0.1) is false.

So the method escapeRedirect of the PortalImpl class returns "null".

I don't know what a proper solution is.
Here are some possible solutions that I can think of:
  1. You have to remove "myhost" from "/etc/hosts"
  2. You have to add the official IP of the server to redirect.url.ips.allowed. But if you run your portal behind a firewall which forwards a official IP to something private (10.0.0.0, 192.168.0.0 etc.) adding the server IP (which might be something like this 10.10.6.5) does not solve this. You also have to add the IP that is used to access the portal from the internet.
  3. You set "env.COMPUTERNAME", "env.HOST" or "env.HOSTNAME" to "myhost.mydomain.com".
Ray Augé
RE: http:/..../group/control_panel/null error in links
2010/08/20 7:50
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 1206

参加年月日: 2005/02/07

最近の投稿

Change your

redirect.url.security.mode=ip

value to

redirect.url.security.mode=domain

and you will be fine.
William Fleming
RE: http:/..../group/control_panel/null error in links
2010/09/30 1:20
答え

William Fleming

ランク: Regular Member

投稿数: 180

参加年月日: 2010/09/15

最近の投稿

Ray Augé:
Change your

redirect.url.security.mode=ip

value to

redirect.url.security.mode=domain

and you will be fine.


I have done both of these and it has changed nothing. See if you are using a proxy or anything will this change anything. My server is virtual on xencenter.

Thanks
Ray Augé
RE: http:/..../group/control_panel/null error in links
2010/09/30 6:25
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 1206

参加年月日: 2005/02/07

最近の投稿

One more thing to note when in IP mode.

On a multi-homed host (more than one IP), the JVM only recognizes one IP as SERVER_IP, therefore you have to list all subnet IPs of the server.

Otherwise, I'll have to test the proxy scenario before I can comment on it (but note that Liferay is often behind some form of proxy as common practice).
Harshal Shah
SOLVED RE: http:/..../group/control_panel/null error in links
2010/10/26 9:15
答え

Harshal Shah

ランク: Junior Member

投稿数: 49

参加年月日: 2010/05/25

最近の投稿

Below is what you need to do

redirect.url.security.mode=ip
redirect.url.ips.allowed=127.0.0.1,put in the ip address accessible from internet,put in ip address of the system where tomcat is installed.

Or you can set up for the domain as well see the post above.

Along with this u need to set up virtual host in
Liferay->Control Panel->Settings->(here set up the virtual host as the like blabla.com or put in the ip address accessible from the internet)

Along with this check the host in /etc/hosts but i did not require to do this.
Felipe Sere
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/10/28 4:57
答え

Felipe Sere

ランク: Junior Member

投稿数: 87

参加年月日: 2010/01/27

最近の投稿

How do I set this if the server is behind a machine acting a router/firewall AND the machine on which tomcat runs is a VM?
Just to clarify: INTERNET --> FIREWALL_SERVER --> PHYSICAL_SERVER --> VIRTUAL_MACHINE.
Do I use the IP of the physical server as it acts as the last redirect before tomcat?
Thanks!

Felipe
Zsolt Balogh
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/10/28 5:07
答え

Zsolt Balogh

LIFERAY STAFF

ランク: Expert

投稿数: 445

参加年月日: 2009/03/23

最近の投稿

Hi Felipe,

You need to set the IP of the host name on which your clients are reaching your Liferay. E.g. if you are the administrator of the www.liferay.com, then you should write the www.liferay.com's IP address, the architecture behind does not matter.

Only use IP mode if you have name resolution on your Liferay installation, if you don't have it, use the domain mode!

Zsolt
Harshal Shah
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/10/28 8:10
答え

Harshal Shah

ランク: Junior Member

投稿数: 49

参加年月日: 2010/05/25

最近の投稿

I think you will have to specify all the three ipadress ie
Ip address of router (ip which is visible from the internet)
Ip address of the physical machine.
Ip address of the virtual machine
Jari Fredriksson
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/11/26 7:42
答え

Jari Fredriksson

ランク: New Member

投稿数: 22

参加年月日: 2010/09/14

最近の投稿

I have this problem and buggers me hard.

My Liferay is behind a reverse proxy, IP 1.2.3.4 and domain for all machines is "example.com"

machines are

liferay.example.com 1.1.1.1 (SERVER_IP)
www.example.com 1.2.3.4

So I have

redirect.url.domains.allowed=example.com
redirect.url.ips.allowed=127.0.0.1,SERVER_IP,1.2.3.4
redirect.url.security.mode=domain

I get the 'location.href = "null"' in control panel buttons.

What to do?
Ray Augé
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/11/26 7:52
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 1206

参加年月日: 2005/02/07

最近の投稿

Your domain list should contain any addresses that might show up in request "Host" header.

So, try:

redirect.url.domains.allowed=example.com,liferay.example.com,www.example.com

Also, just for kicks, can you post your reverse proxy settings if it's not too complex?
Ray Augé
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/11/26 8:18
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 1206

参加年月日: 2005/02/07

最近の投稿

Effectively when using redirect.url.security.mode=domain you may end having to specify all the domains set as virtual hosts on communities or orgs throughout the portal in the list redirect.url.domains.allowed.

Yes, this sounds problematic since you want to be able to create vhosts at will and have it all work without restarts.

It would seem that what happened is the logic to sanitize redirects (a measure implemented as part of OWASP recommendations) fails to check whether the domain is actually used as a valid vhost address by one of the portal instances, communities, or orgs in the system.

It would be a matter of performing a lookup at com.liferay.portal.util.PortalImpl.escapeRedirect(String url) :

 1@@ -660,15 +661,31 @@ public class PortalImpl implements Portal {
 2     public String escapeRedirect(String url) {
 3         if (Validator.isNull(url) || !HttpUtil.hasDomain(url)) {
 4             return url;
 5         }
 6
 7+        String domain = StringUtil.split(
 8+            HttpUtil.getDomain(url), StringPool.COLON)[0];
 9+
10         try {
11-            String securityMode = PropsValues.REDIRECT_URL_SECURITY_MODE;
12+            CompanyLocalServiceUtil.getCompanyByVirtualHost(domain);
13+
14+            return url;
15+        }
16+        catch (Exception e) {
17+        }
18+
19+        try {
20+            LayoutSetLocalServiceUtil.getLayoutSet(domain);
21+
22+            return url;
23+        }
24+        catch (Exception e) {
25+        }
26
27-            String domain = StringUtil.split(
28-                HttpUtil.getDomain(url), StringPool.COLON)[0];
29+        try {
30+            String securityMode = PropsValues.REDIRECT_URL_SECURITY_MODE;
31
32             if (securityMode.equals("domain")) {
33                 String[] allowedDomains =
34                     PropsValues.REDIRECT_URL_DOMAINS_ALLOWED;
35


I didn't test this patch but it seems pretty logical to assume that whatever the redirect.url.security.mode is set to, if there is a company or group using an address as it's virtual host it should be safe.

What do you think?
Ray Augé
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/11/26 8:45
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 1206

参加年月日: 2005/02/07

最近の投稿

Please see: http://issues.liferay.com/browse/LPS-12157

The change only affects one method so it could be patched in an older version with not too much effort.
Jari Fredriksson
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/11/26 11:45
答え

Jari Fredriksson

ランク: New Member

投稿数: 22

参加年月日: 2010/09/14

最近の投稿

I got it working by changing the policy to "ip" instead of "domain". (I had all IP's listed in allowed IP's)

Also, what might be more important, my /etc/hosts had the host dns-name listed as 127.0.1.1 (maybe Debian default), I hanged it to the real IP and now all fine.
benjamin challamel
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2010/12/17 7:51
答え

benjamin challamel

ランク: New Member

投稿数: 17

参加年月日: 2010/12/15

最近の投稿

I got it working also.

To solve it, you have to change settings in portal-ext.properties

redirect.url.security.mode=domain
redirect.url.domains.allowed=my-company.net,my-company.com

Benjamin
Jonas Yuan
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/01/01 13:02
答え

Jonas Yuan

ランク: Liferay Master

投稿数: 993

参加年月日: 2007/04/26

最近の投稿

Hi Ray, Thanks. Nice fix.

Maybe it would be better to set following as default.

1redirect.url.ips.allowed=


same as the allowed domain

1redirect.url.domains.allowed=


That is, any IP or domain is allowed by default.

Do it make sense?
Dana Oredson
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/01/26 13:47
答え

Dana Oredson

ランク: Junior Member

投稿数: 70

参加年月日: 2008/10/14

最近の投稿

Jonas X. Yuan:
Hi Ray, Thanks. Nice fix.

Maybe it would be better to set following as default.

1redirect.url.ips.allowed=


same as the allowed domain

1redirect.url.domains.allowed=


That is, any IP or domain is allowed by default.

Do it make sense?


Does that actually work? I haven't seen any announcements for 6.0.6, so would like a workaround if available.
Dana Oredson
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/01/26 13:48
答え

Dana Oredson

ランク: Junior Member

投稿数: 70

参加年月日: 2008/10/14

最近の投稿

Jari Fredriksson:
I got it working by changing the policy to "ip" instead of "domain". (I had all IP's listed in allowed IP's)

Also, what might be more important, my /etc/hosts had the host dns-name listed as 127.0.1.1 (maybe Debian default), I hanged it to the real IP and now all fine.


When you used IP, was it the IP of the web server, or application server?)
Ray Augé
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/01/26 13:51
答え

Ray Augé

LIFERAY STAFF

ランク: Liferay Legend

投稿数: 1206

参加年月日: 2005/02/07

最近の投稿

app server.
Tom Thomas
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/04/13 13:34
答え

Tom Thomas

ランク: Junior Member

投稿数: 33

参加年月日: 2009/09/10

最近の投稿

All this seems redundant and was not necessary in the previous 5.2.XX releases - the ip and hosts names are already in the hosts file on Windows systems. This seems like a bug in the 6.0.5 release to me and, in fact, none of the above solutions fixed the link problem when returning from the control panel to the previous page.
Kevin Mui
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/05/16 9:56
答え

Kevin Mui

ランク: New Member

投稿数: 4

参加年月日: 2011/05/16

最近の投稿

seeing the null error as well. And I think it started after I removed 7cogs from webapps.

Where can I find portal-ext.properties ?
Mani kandan
RE: http:/..../group/control_panel/null error in links
2011/06/05 23:51
答え

Mani kandan

ランク: Expert

投稿数: 490

参加年月日: 2010/09/15

最近の投稿

Jignesh Thakkar:
I found the same issue and I got successed to resolve this issue.

For resolving this issue you have to set 3 properties in your portal-ext.properties file.

redirect.url.security.mode=ip
redirect.url.domains.allowed=
redirect.url.ips.allowed=127.0.0.1,SERVER_IP.

You can set your ip address instead of SERVER_IP by comma seprated.

Then after starting your liferay server you have to do some settings.

Here I mention the steps to do setting. just follow this.

1) Login as Admin
2) Go to setting -> Control Panel
3) set the virtual host name (like 192.168.100.113 or abc.xyz.com) and then save it.

And you found that you got the solution.


Nice steps I followed its working fine
Mani kandan
RE: SOLVED RE: http:/..../group/control_panel/null error in links
2011/08/19 0:34
答え

Mani kandan

ランク: Expert

投稿数: 490

参加年月日: 2010/09/15

最近の投稿

Here the file
添付ファイル: portal-ext.properties (235.4k)
Cid Moreno Miranda
RE: http:/..../group/control_panel/null error in links
2011/09/27 17:08
答え

Cid Moreno Miranda

ランク: New Member

投稿数: 1

参加年月日: 2011/09/27

最近の投稿

Jignesh Thakkar:
I found the same issue and I got successed to resolve this issue.

For resolving this issue you have to set 3 properties in your portal-ext.properties file.

redirect.url.security.mode=ip
redirect.url.domains.allowed=
redirect.url.ips.allowed=127.0.0.1,SERVER_IP.

You can set your ip address instead of SERVER_IP by comma seprated.

Then after starting your liferay server you have to do some settings.

Here I mention the steps to do setting. just follow this.

1) Login as Admin
2) Go to setting -> Control Panel
3) set the virtual host name (like 192.168.100.113 or abc.xyz.com) and then save it.

And you found that you got the solution.



Works fine!
Mani kandan
RE: http:/..../group/control_panel/null error in links
2012/09/11 22:33
答え

Mani kandan

ランク: Expert

投稿数: 490

参加年月日: 2010/09/15

最近の投稿

Ray Augé:
Change your

redirect.url.security.mode=ip

value to

redirect.url.security.mode=domain

and you will be fine.



Good one Ray,