Fix UUID Regex when normalizing serviceIds

This commit is contained in:
automated-signal 2024-12-10 12:22:14 -06:00 committed by GitHub
parent 08e5d15501
commit be6ec5d347
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,9 @@
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
// [47] to support v4 and v7 uuids
const UUID_REGEXP =
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
/^[0-9A-F]{8}-[0-9A-F]{4}-[47][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
export const isValidUuid = (value: unknown): value is string => {
if (typeof value !== 'string') {