prevent null spoofhost

This commit is contained in:
zzz
2009-01-24 23:42:31 +00:00
parent ae0bcc492d
commit 6ed17c1a5f
2 changed files with 4 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ public class EditBean extends IndexBean {
public String getTargetHost(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null)
if (tun != null && tun.getTargetHost() != null)
return tun.getTargetHost();
else
return "127.0.0.1";
@@ -53,7 +53,7 @@ public class EditBean extends IndexBean {
}
public String getSpoofedHost(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null)
if (tun != null && tun.getSpoofedHost() != null)
return tun.getSpoofedHost();
else
return "";