From 09799d83c61e19d3dcd5e42f928409bb4162c638 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 17 Jun 2021 09:23:54 +1000 Subject: [PATCH] allow single chars ONS --- ts/session/snode_api/SNodeAPI.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/session/snode_api/SNodeAPI.ts b/ts/session/snode_api/SNodeAPI.ts index 3906d614e..8df50f5db 100644 --- a/ts/session/snode_api/SNodeAPI.ts +++ b/ts/session/snode_api/SNodeAPI.ts @@ -27,7 +27,7 @@ import { Snode } from '../../data/data'; // ONS name can have [a-zA-Z0-9_-] except that - is not allowed as start or end // do not define a regex but rather create it on the fly to avoid https://stackoverflow.com/questions/3891641/regex-test-only-works-every-other-time -export const onsNameRegex = '^[a-zA-Z0-9_][a-zA-Z0-9_-]*[a-zA-Z0-9_]$'; +export const onsNameRegex = '^\\w([\\w-]*[\\w])?$'; const getSslAgentForSeedNode = (seedNodeHost: string, isSsl = false) => { let filePrefix = '';