Skip to content

Commit

Permalink
Refactor regex for default Workflow URLs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
atc0005 committed Jul 24, 2024
1 parent 85b74aa commit efa7c68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion send.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (

// Known Workflow URL patterns for submitting messages to Microsoft Teams.
const (
WorkflowURLBaseDomain = "logic.azure.com"
WorkflowURLBaseDomain = `^https:\/\/(?:.*\.azure-api|logic\.azure)\.(?:com|net)`
)

// DisableWebhookURLValidation is a special keyword used to indicate to
Expand Down

0 comments on commit efa7c68

Please sign in to comment.