Compare commits

...

2 Commits

View File

@ -459,9 +459,15 @@ abstract class BaseOmemoManager extends XmppManagerBase {
); );
} }
final envelopeChildren = envelope.firstTag('content')?.children;
if (envelopeChildren != null) {
children.addAll( children.addAll(
envelope.firstTag('content')!.children, // 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();