Commit 9d9a38bc authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added logging when receiving a malformed JID.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4906 b35dd754-fafc-0310-a699-88a17e54d16e
parent 27946891
...@@ -135,6 +135,7 @@ public abstract class SocketReader implements Runnable { ...@@ -135,6 +135,7 @@ public abstract class SocketReader implements Runnable {
packet = new Message(doc); packet = new Message(doc);
} }
catch(IllegalArgumentException e) { catch(IllegalArgumentException e) {
Log.debug("Rejecting packet. JID malformed", e);
// The original packet contains a malformed JID so answer with an error. // The original packet contains a malformed JID so answer with an error.
Message reply = new Message(); Message reply = new Message();
reply.setID(doc.attributeValue("id")); reply.setID(doc.attributeValue("id"));
...@@ -152,6 +153,7 @@ public abstract class SocketReader implements Runnable { ...@@ -152,6 +153,7 @@ public abstract class SocketReader implements Runnable {
packet = new Presence(doc); packet = new Presence(doc);
} }
catch (IllegalArgumentException e) { catch (IllegalArgumentException e) {
Log.debug("Rejecting packet. JID malformed", e);
// The original packet contains a malformed JID so answer an error // The original packet contains a malformed JID so answer an error
Presence reply = new Presence(); Presence reply = new Presence();
reply.setID(doc.attributeValue("id")); reply.setID(doc.attributeValue("id"));
...@@ -196,6 +198,7 @@ public abstract class SocketReader implements Runnable { ...@@ -196,6 +198,7 @@ public abstract class SocketReader implements Runnable {
packet = getIQ(doc); packet = getIQ(doc);
} }
catch(IllegalArgumentException e) { catch(IllegalArgumentException e) {
Log.debug("Rejecting packet. JID malformed", e);
// The original packet contains a malformed JID so answer an error // The original packet contains a malformed JID so answer an error
IQ reply = new IQ(); IQ reply = new IQ();
if (!doc.elements().isEmpty()) { if (!doc.elements().isEmpty()) {
......
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