Update teams sink validation to accept post-2026 webhook hosts - #4112
Update teams sink validation to accept post-2026 webhook hosts#4112JohnBlackwell wants to merge 3 commits into
Conversation
Soffi AI SummaryThis PR updates the Microsoft Teams webhook URL validation logic in the notification sink configuration to support post-2026 Microsoft webhook hosts. Microsoft is migrating away from the legacy The fix extracts the URL-matching logic into a dedicated ChangesTeams notification sink webhook URL support
Updated: 2026-09-04 16:43 UTC |
Greptile SummaryUpdates notification sink URL validation to support current Microsoft Teams webhook domains while restricting Slack and Teams URLs to HTTPS on approved hosts.
Confidence Score: 5/5The PR appears safe to merge; the previously reported invalid-port crash is fixed and no new actionable failures were identified. The URL constructor is now guarded, so malformed HTTPS URLs such as those with out-of-range ports return false rather than crashing the notification sink modal. The previous finding was also manually resolved.
|
| Filename | Overview |
|---|---|
| js/console/src/components/settings/notifications/sinks/UpsertNotificationSinkModal.tsx | Adds reusable HTTPS webhook-host validation and safely handles URL parsing failures; no actionable issues remain. |
Reviews (2): Last reviewed commit: "catch malformed urls" | Re-trigger Greptile
|
plural review this |
Plural SummaryFinal-head review found no actionable defects. The webhook classifier now parses HTTPS URLs before allowlist matching, preserves Slack/Teams mutation behavior, and the focused helper tests pass (5/5). Mergeability Grade: AA — merge-ready. The change replaces permissive string matching with exact or dot-delimited subdomain checks on parsed HTTPS hostnames, preventing the reviewed userinfo and suffix spoofing cases while retaining Slack Gov and the newly supported Teams host families. No correctness, security, TypeScript, or call-site regression was found. Files changed (3)
|
|
plural review this |
michaeljguarino
left a comment
There was a problem hiding this comment.
this validation shouldn't be on the frontend at all, it should be done server-side.
https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet
Will allow new MS teams webhooks to be used in addtion to legacy ones. Introduces new helper function to avoid creating additional regex expressions.
Test environment: https://console.your-env.onplural.sh/
Tested with local dev env with the following urls:
Pass
https://environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/abc123/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=test
https://prod-01.westus.logic.azure.com:443/workflows/abc123/triggers/manual/paths/invoke?api-version=2016-10-01&sig=test
https://make.powerautomate.com/workflows/abc123/triggers/manual/paths/invoke?sig=test
https://outlook.office.com/webhook/abc123/IncomingWebhook/test
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Fail
http://environment.api.powerplatform.com/workflows/abc123
https://example.com/workflows/abc123
https://not-slack.example.com/services/test
not-a-url
Checklist
Plural Flow: console