Skip to content

Commit

Permalink
Refactor regex for default Workflow URLs (redux)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
atc0005 committed Jul 24, 2024
1 parent 7bb323c commit 7a1c0df
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 = `^https:\/\/(?:.*\.azure-api|logic\.azure)\.(?:com|net)`
WorkflowURLBaseDomain = `^https:\/\/(?:.*)(:?\.azure-api|logic\.azure)\.(?:com|net)`
)

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

0 comments on commit 7a1c0df

Please sign in to comment.