Commit 12c5310e authored by Maxime Buquet's avatar Maxime Buquet

poezio/plugin_e2ee: Use encrypted_tags attribute to complete whitelist filtering on encryption

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent a166fcb5
Pipeline #2177 passed with stages
in 2 minutes and 45 seconds
......@@ -251,8 +251,12 @@ class E2EEPlugin(BasePlugin):
# Filter stanza with the whitelist. Plugins doing stanza encryption
# will have to include these in their encrypted container beforehand.
whitelist = self.tag_whitelist
if self.encrypted_tags is not None:
whitelist += self.encrypted_tags
for elem in message.xml[:]:
if elem.tag not in self.tag_whitelist:
if elem.tag not in whitelist:
message.xml.remove(elem)
log.debug('Encrypted %s message: %r', self.encryption_name, message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment