Commit b50e2f16 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-48] Fixed to not actually acknowledge fake password in registration dialog.

[GATE-57] Ignoring blank messages.  (though they will be used for other things later)

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@5485 b35dd754-fafc-0310-a699-88a17e54d16e
parent b0b3c920
...@@ -162,8 +162,10 @@ public abstract class BaseTransport implements Component, RosterEventListener, P ...@@ -162,8 +162,10 @@ public abstract class BaseTransport implements Component, RosterEventListener, P
// Message to gateway itself. Throw away for now. // Message to gateway itself. Throw away for now.
try { try {
TransportSession session = sessionManager.getSession(from); TransportSession session = sessionManager.getSession(from);
if (packet.getBody() != null) {
session.sendServerMessage(packet.getBody()); session.sendServerMessage(packet.getBody());
} }
}
catch (NotFoundException e) { catch (NotFoundException e) {
// TODO: Should return an error packet here // TODO: Should return an error packet here
Log.debug("Unable to find session."); Log.debug("Unable to find session.");
...@@ -172,8 +174,10 @@ public abstract class BaseTransport implements Component, RosterEventListener, P ...@@ -172,8 +174,10 @@ public abstract class BaseTransport implements Component, RosterEventListener, P
else { else {
try { try {
TransportSession session = sessionManager.getSession(from); TransportSession session = sessionManager.getSession(from);
if (packet.getBody() != null) {
session.sendMessage(to, packet.getBody()); session.sendMessage(to, packet.getBody());
} }
}
catch (NotFoundException e) { catch (NotFoundException e) {
// TODO: Should return an error packet here // TODO: Should return an error packet here
Log.debug("Unable to find session."); Log.debug("Unable to find session.");
......
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
try { try {
Registration reg = new Registration(regId); Registration reg = new Registration(regId);
reg.setUsername(ParamUtils.getParameter(request, "gatewayUsername")); reg.setUsername(ParamUtils.getParameter(request, "gatewayUsername"));
if (!ParamUtils.getParameter(request, "gatewayPassword").equals("********")) {
reg.setPassword(ParamUtils.getParameter(request, "gatewayPassword")); reg.setPassword(ParamUtils.getParameter(request, "gatewayPassword"));
}
reg.setNickname(ParamUtils.getParameter(request, "gatewayNickname")); reg.setNickname(ParamUtils.getParameter(request, "gatewayNickname"));
response.sendRedirect("gateway-registrations.jsp?success=true"); response.sendRedirect("gateway-registrations.jsp?success=true");
return; return;
...@@ -468,7 +470,7 @@ ...@@ -468,7 +470,7 @@
<strong><fmt:message key="gateway.web.registrations.username" /></strong> <strong><fmt:message key="gateway.web.registrations.username" /></strong>
</div> </div>
<div class="jive-registrations-editPassword"> <div class="jive-registrations-editPassword">
<input type="password" name="gatewayPassword" size="12" maxlength="50" value="*********"><br> <input type="password" name="gatewayPassword" size="12" maxlength="50" value="********"><br>
<strong><fmt:message key="gateway.web.registrations.password" /></strong> <strong><fmt:message key="gateway.web.registrations.password" /></strong>
</div> </div>
<div class="jive-registrations-editNickname"> <div class="jive-registrations-editNickname">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment