forked from Mirrors/keyoxide-web
Improve XMPP regex
This commit is contained in:
parent
39fc871749
commit
3401810fac
1 changed files with 3 additions and 1 deletions
|
@ -535,7 +535,9 @@ async function verifyProof(url, fingerprint) {
|
|||
// XMPP
|
||||
if (/^xmpp:/.test(url)) {
|
||||
output.type = "xmpp";
|
||||
match = url.match(/xmpp:(.*)@(.*)/);
|
||||
console.log(url);
|
||||
match = url.match(/xmpp:([a-zA-Z0-9\.\-\_]*)@([a-zA-Z0-9\.\-\_]*)(?:\?(.*))?/);
|
||||
console.log(match);
|
||||
output.display = `${match[1]}@${match[2]}`;
|
||||
output.proofUrl = `https://xmpp-vcard.keyoxide.org/api/vcard/${output.display}/DESC`;
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue