aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-05-02 20:40:28 +0200
committerChristian Schneppe <christian@pix-art.de>2018-05-02 20:40:28 +0200
commitcb9c00d2883a3497fb74bb9c3b64c609f0310d77 (patch)
treecf59320ebe4e2784654beeecda60a8d6e030ec12 /src
parente3219fbd72db13e3b1ec57c181e670f8bfe957a8 (diff)
do not crash when inner message contains invalid jid
Diffstat (limited to 'src')
-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;
}