From 9963616270dcb4dad12e3a00f5ea1804fb3f2201 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 28 Apr 2018 16:56:32 +0200 Subject: [PATCH 1/2] do not crash when inner message contains invalid jid --- .../java/eu/siacs/conversations/parser/MessageParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 6da26fd11..209a2a689 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -293,8 +293,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; } From 1d51f098f248ad6eeaedaed816764ab63c4fb44a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 28 Apr 2018 16:58:04 +0200 Subject: [PATCH 2/2] version bump to 2.1.4 + changelog --- CHANGELOG.md | 3 +++ build.gradle | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f21c2d140..bbd6412f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### Version 2.1.4 +* bug fixes + ### Version 2.1.3 * Do not process stanzas with invalid JIDs diff --git a/build.gradle b/build.gradle index 27a2a5b51..5fc4508da 100644 --- a/build.gradle +++ b/build.gradle @@ -65,8 +65,8 @@ android { defaultConfig { minSdkVersion 19 targetSdkVersion 25 - versionCode 267 - versionName "2.1.3" + versionCode 268 + versionName "2.1.4" archivesBaseName += "-$versionName" applicationId "eu.siacs.conversations" resValue "string", "applicationId", applicationId