Compare commits

...

2 Commits

View File

@ -459,9 +459,15 @@ abstract class BaseOmemoManager extends XmppManagerBase {
); );
} }
children.addAll( final envelopeChildren = envelope.firstTag('content')?.children;
envelope.firstTag('content')!.children, if (envelopeChildren != null) {
); children.addAll(
// Do not add forbidden elements from the envelope
envelopeChildren.where(shouldEncryptElement),
);
} else {
logger.warning('Invalid envelope element: No <content /> element');
}
if (!checkAffixElements(envelope, stanza.from!, ourJid)) { if (!checkAffixElements(envelope, stanza.from!, ourJid)) {
other['encryption_error'] = InvalidAffixElementsException(); other['encryption_error'] = InvalidAffixElementsException();