From 88540420b49d75ea04b689d668a775374152d025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 22 Jan 2020 18:18:48 +0100 Subject: [PATCH] Ensure non-ascii Jids are also converted properly in data dir name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio_plugins/omemo/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poezio_plugins/omemo/__init__.py b/poezio_plugins/omemo/__init__.py index 0e0fe3c..05e4a4c 100644 --- a/poezio_plugins/omemo/__init__.py +++ b/poezio_plugins/omemo/__init__.py @@ -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)