From 3d99d2373dce70a1cce682b8de9afb0356acb548 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 3 Jun 2021 09:58:39 +0200 Subject: [PATCH] Fix IRC nickname regex --- src/claimDefinitions/irc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/claimDefinitions/irc.js b/src/claimDefinitions/irc.js index dbf0804..dd8de0f 100644 --- a/src/claimDefinitions/irc.js +++ b/src/claimDefinitions/irc.js @@ -15,7 +15,7 @@ limitations under the License. */ const E = require('../enums') -const reURI = /^irc\:\/\/(.*)\/([a-zA-Z0-9]*)/ +const reURI = /^irc\:\/\/(.*)\/([a-zA-Z0-9\-\[\]\\\`\_\^\{\|\}]*)/ const processURI = (uri) => { const match = uri.match(reURI) @@ -63,6 +63,10 @@ const tests = [ uri: 'irc://chat.ircserver.org/alice?param=123', shouldMatch: true, }, + { + uri: 'irc://chat.ircserver.org/alice_bob', + shouldMatch: true, + }, { uri: 'https://chat.ircserver.org/alice', shouldMatch: false,