From bb5ffe1cae79ae3a0998a7427d40a61323f6a691 Mon Sep 17 00:00:00 2001 From: Shivanand Sonnad Date: Mon, 6 Jan 2025 12:35:37 +0000 Subject: [PATCH] fix: [AH-859] Update URL validaiton regex to support aws urls (#3230) * fix: [AH-859] Update URL validaiton regex to support aws urls --- web/src/ar/constants.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/ar/constants.ts b/web/src/ar/constants.ts index bb44786d9..6d11f744d 100644 --- a/web/src/ar/constants.ts +++ b/web/src/ar/constants.ts @@ -27,8 +27,7 @@ export const DEFAULT_TIME_FORMAT = 'hh:mm a' export const DEFAULT_DATE_TIME_FORMAT = `${DEFAULT_DATE_FORMAT} ${DEFAULT_TIME_FORMAT}` export const REPO_KEY_REGEX = /^[a-z0-9]+(?:[._-][a-z0-9]+)*$/ -export const URL_REGEX = - /((https):\/\/)(www.)?[a-z0-9]+(\.[a-z]{2,}){1,3}(#?\/?[a-zA-Z0-9#]+)*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/ +export const URL_REGEX = /^https:\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}(:[0-9]{1,5})?(\/[^\s]*)?$/ export enum PreferenceScope { USER = 'USER',