java/code/src/com/redhat/rhn/frontend/action/satellite/BootstrapConfigAction.java | 6
++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit d6902867cad5a94f5c91884237d0387812b42f4c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue May 3 14:20:18 2011 +0200
683200 - encode hostname to IDN in BootstrapConfig.do page
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/satellite/BootstrapConfigAction.java
b/java/code/src/com/redhat/rhn/frontend/action/satellite/BootstrapConfigAction.java
index 6d6f493..1eaee18 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/BootstrapConfigAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/BootstrapConfigAction.java
@@ -30,6 +30,7 @@ import org.apache.struts.action.DynaActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.net.IDN;
/**
* BootstrapConfigAction - action to handle changing the bootstrap config file options.
@@ -73,7 +74,7 @@ public class BootstrapConfigAction extends BaseConfigAction {
ConfigureBootstrapCommand cmd = (ConfigureBootstrapCommand)
getCommand(requestContext.getCurrentUser());
- cmd.setHostname(form.getString(HOSTNAME));
+ cmd.setHostname(IDN.toASCII(form.getString(HOSTNAME)));
cmd.setSslPath(form.getString(SSL_CERT));
cmd.setEnableSsl((Boolean) form.get(ENABLE_SSL));
cmd.setEnableGpg((Boolean) form.get(ENABLE_GPG));
@@ -96,7 +97,8 @@ public class BootstrapConfigAction extends BaseConfigAction {
}
}
else {
- form.set(HOSTNAME, Config.get().getString(ConfigDefaults.JABBER_SERVER));
+ form.set(HOSTNAME, IDN.toUnicode(
+ Config.get().getString(ConfigDefaults.JABBER_SERVER)));
form.set(SSL_CERT, DEFAULT_CERT_PATH);
form.set(ENABLE_SSL, Boolean.TRUE);
form.set(ENABLE_GPG, Boolean.TRUE);
Show replies by date