From 7a1c0df5f3b02b2eff3e7c5cb678737002032ce3 Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Wed, 24 Jul 2024 07:46:24 -0500 Subject: [PATCH] Refactor regex for default Workflow URLs (redux) THIS is the regex pattern intended for GH-277. Previous commit message: Switch from static base pattern of `logic.azure.com` to a regex OR pattern to permit either of `logic.azure.com` or `*.azure-api.net` as has been observed in the wild. This also has the side effect of resolving potential CodeQL alerts raised in PR GH-275. refs GH-262 --- send.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.go b/send.go index 8e00ec7..f38c23b 100644 --- a/send.go +++ b/send.go @@ -36,7 +36,7 @@ const ( // Known Workflow URL patterns for submitting messages to Microsoft Teams. const ( - WorkflowURLBaseDomain = `^https:\/\/(?:.*\.azure-api|logic\.azure)\.(?:com|net)` + WorkflowURLBaseDomain = `^https:\/\/(?:.*)(:?\.azure-api|logic\.azure)\.(?:com|net)` ) // DisableWebhookURLValidation is a special keyword used to indicate to