aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-09-12 19:46:20 +0200
committerChristian Schneppe <christian@pix-art.de>2019-09-12 19:46:20 +0200
commit88574e39d27a44bab1555f25dde062b1abf602bc (patch)
tree376b0c3e0bb4d91f5a34d131ee9a2232ecd3eeb6 /src/main/java/de/pixart/messenger/crypto
parent8857f9341c46ce1294c56bc5c729e126884be10c (diff)
when parsing omemo messages ensure we only find one element
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlMessage.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlMessage.java b/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlMessage.java
index 5d6b9529b..cfa6a275e 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlMessage.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlMessage.java
@@ -134,7 +134,7 @@ public class XmppAxolotlMessage {
break;
}
}
- Element payloadElement = axolotlMessage.findChild(PAYLOAD); //TODO make sure we only have _one_ paypload
+ final Element payloadElement = axolotlMessage.findChildEnsureSingle(PAYLOAD, AxolotlService.PEP_PREFIX);
if (payloadElement != null) {
ciphertext = Base64.decode(payloadElement.getContent().trim(), Base64.DEFAULT);
}