aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java
index 5e307531f..c72af97aa 100644
--- a/src/main/java/de/pixart/messenger/parser/MessageParser.java
+++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java
@@ -396,8 +396,8 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
boolean notify = false;
- if (from == null) {
- Log.d(Config.LOGTAG, "no from in: " + packet.toString());
+ if (from == null || !InvalidJid.isValid(from) || !InvalidJid.isValid(to)) {
+ Log.e(Config.LOGTAG, "encountered invalid message from='" + from + "' to='" + to + "'");
return;
}