Ensure non-ascii Jids are also converted properly in data dir name

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent f755df9d
......@@ -62,7 +62,7 @@ class Plugin(E2EEPlugin):
self.info = lambda i: self.api.information(i, 'Info')
jid_str = self.core.xmpp.boundjid.bare.encode('US-ASCII')
jid_str = self.core.xmpp.boundjid.bare.encode('utf-8')
digest = hashlib.sha256(jid_str).digest()
hashed_jid = base64.b32encode(digest).decode('US-ASCII')
data_dir = os.path.join(DATA_HOME, 'omemo', hashed_jid)
......
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