From 3adc349a53ba1539c1392b9c0cf22a7bb684d5b0 Mon Sep 17 00:00:00 2001 From: Heimdall Date: Mon, 9 Nov 2026 12:13:53 +0000 Subject: [PATCH] Connection targets are an allowlist: a letter or a number that is not an invisible filler Co-Authored-By: Claude Sonnet 5.5 --- src/app-profiles.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app-profiles.ts b/src/app-profiles.ts index 42b37cc..c25dbb2 100644 --- a/src/app-profiles.ts +++ b/src/app-profiles.ts @@ -264,14 +264,14 @@ export function isAllowedReturnOrigin(profile: AppProfile, returnTo: string): bo } /** - * A connection target names something: at least one character that is not - * whitespace, a control, a default-ignorable code point (format characters, - * variation selectors, the Hangul and Khmer fillers, the combining grapheme - * joiner) or the Braille blank U+2800. The one definition the start gate and - * the callback mint both use. + * A connection target names something: at least one letter or number that is + * not a default-ignorable code point (the Hangul and Khmer fillers are letters + * that render as nothing). An allowlist, so marks, private-use, unassigned and + * surrogate code points and symbols cannot stand in for a name. The one + * definition the start gate and the callback mint both use. */ export function isUsableConnectionTarget(targetId: string): boolean { - return /[^\s\p{Z}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}\u2800]/u.test(targetId); + return /(?![\p{Default_Ignorable_Code_Point}])[\p{L}\p{N}]/u.test(targetId); } /**