From d88e03d70c5e39e06c0890984da8a049ca6791c5 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 26 Oct 2018 10:08:29 +0200 Subject: [PATCH] Use URL-encoded bareJid in file-based store implementations --- .../smackx/ox/store/filebased/FileBasedOpenPgpStore.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/store/filebased/FileBasedOpenPgpStore.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/store/filebased/FileBasedOpenPgpStore.java index b64a89645..e92c5153f 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/store/filebased/FileBasedOpenPgpStore.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/store/filebased/FileBasedOpenPgpStore.java @@ -36,8 +36,7 @@ public class FileBasedOpenPgpStore extends AbstractOpenPgpStore { } public static File getContactsPath(File basePath, BareJid jid) { - // TODO: This is not filesystem agnostic, the jid should be base32 encoded. - return new File(basePath, Objects.requireNonNull(jid.toString())); + return new File(basePath, Objects.requireNonNull(jid.asUrlEncodedString())); } }