1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-23 03:54:49 +02:00

Fix XMPP key selection strategy by auto appending xmpp: if missing

This commit is contained in:
Paul Schaub 2020-01-12 19:56:16 +01:00
parent e7ff9f0354
commit db15a3e962
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -24,7 +24,10 @@ public class XMPP {
@Override
public boolean accept(String jid, PGPPublicKeyRing keyRing) {
return super.accept("xmpp:" + jid, keyRing);
if (!jid.matches("^xmpp:.+$")) {
jid = "xmpp:" + jid;
}
return super.accept(jid, keyRing);
}
}
@ -32,7 +35,10 @@ public class XMPP {
@Override
public boolean accept(String jid, PGPSecretKeyRing keyRing) {
return super.accept("xmpp:" + jid, keyRing);
if (!jid.matches("^xmpp:.+$")) {
jid = "xmpp:" + jid;
}
return super.accept(jid, keyRing);
}
}
}