Skip to content

Commit 0244cfa

Browse files
committed
fix(validation): add mx and eu-isoe prefixes to validateAwsRegion regex
1 parent 9075a3c commit 0244cfa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/sim/lib/core/security/input-validation.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,9 @@ export function validateAirtableId(
857857
* - GovCloud: us-gov-east-1, us-gov-west-1
858858
* - China: cn-north-1, cn-northwest-1
859859
* - Israel: il-central-1
860-
* - ISO partitions: us-iso-east-1, us-isob-east-1
860+
* - ISO partitions: us-iso-east-1, us-iso-west-1, us-isob-east-1
861+
* - Mexico: mx-central-1
862+
* - EU Sovereign Cloud: eu-isoe-west-1
861863
*
862864
* @param value - The AWS region to validate
863865
* @param paramName - Name of the parameter for error messages
@@ -883,7 +885,7 @@ export function validateAwsRegion(
883885
}
884886

885887
const awsRegionPattern =
886-
/^(af|ap|ca|cn|eu|il|me|sa|us|us-gov|us-iso|us-isob)-(central|north|northeast|northwest|south|southeast|southwest|east|west)-\d{1,2}$/
888+
/^(af|ap|ca|cn|eu|eu-isoe|il|me|mx|sa|us|us-gov|us-iso|us-isob)-(central|north|northeast|northwest|south|southeast|southwest|east|west)-\d{1,2}$/
887889

888890
if (!awsRegionPattern.test(value)) {
889891
logger.warn('Invalid AWS region format', {

0 commit comments

Comments
 (0)