Commit f40c6aa4 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Return IQ error internal_server_error when an exception occurs while...

Return IQ error internal_server_error when an exception occurs while processing an IQ packet. JM-1125

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches/3_3_1_branch@9173 b35dd754-fafc-0310-a699-88a17e54d16e
parent bd4e0766
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
package org.jivesoftware.openfire; package org.jivesoftware.openfire;
import org.dom4j.Element; import org.dom4j.Element;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.jivesoftware.openfire.auth.UnauthorizedException; import org.jivesoftware.openfire.auth.UnauthorizedException;
import org.jivesoftware.openfire.container.BasicModule; import org.jivesoftware.openfire.container.BasicModule;
import org.jivesoftware.openfire.handler.IQHandler; import org.jivesoftware.openfire.handler.IQHandler;
...@@ -24,6 +22,8 @@ import org.jivesoftware.openfire.privacy.PrivacyListManager; ...@@ -24,6 +22,8 @@ import org.jivesoftware.openfire.privacy.PrivacyListManager;
import org.jivesoftware.openfire.session.ClientSession; import org.jivesoftware.openfire.session.ClientSession;
import org.jivesoftware.openfire.session.Session; import org.jivesoftware.openfire.session.Session;
import org.jivesoftware.openfire.user.UserManager; import org.jivesoftware.openfire.user.UserManager;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.xmpp.packet.IQ; import org.xmpp.packet.IQ;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.Message; import org.xmpp.packet.Message;
...@@ -341,10 +341,9 @@ public class IQRouter extends BasicModule { ...@@ -341,10 +341,9 @@ public class IQRouter extends BasicModule {
Log.error(LocaleUtils.getLocalizedString("admin.error.routing"), e); Log.error(LocaleUtils.getLocalizedString("admin.error.routing"), e);
Session session = sessionManager.getSession(packet.getFrom()); Session session = sessionManager.getSession(packet.getFrom());
if (session != null) { if (session != null) {
Connection conn = session.getConnection(); IQ reply = IQ.createResultIQ(packet);
if (conn != null) { reply.setError(PacketError.Condition.internal_server_error);
conn.close(); session.process(reply);
}
} }
} }
} }
......
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