Skip to content

Commit a562220

Browse files
Added webhook URL validation
1 parent a8dfeab commit a562220

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

AppBox/Common/ServiceIntegrations/MSTeamsClient/MSTeamsClient.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ + (void)sendMessage:(IPAUploadInfo *)ipaUploadInfo
1414
webhook:(NSString *)webhook
1515
message:(NSString *)message
1616
completion:(void (^) (BOOL success))completion{
17+
// Validate webhook URL
18+
if (![Common isValidWebhookURL:webhook]) {
19+
DDLogError(@"MS Teams Error - Invalid webhook URL: %@", webhook);
20+
completion(NO);
21+
return;
22+
}
23+
1724
//set slack message
1825
NSString *finalMessage;
1926
if (message.length > 0) {

AppBox/Common/ServiceIntegrations/SlackClient/SlackClient.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ + (void)sendMessage:(IPAUploadInfo *)ipaUploadInfo
1414
webhook:(NSString *)webhook
1515
message:(NSString *)message
1616
completion:(void (^) (BOOL success))completion {
17+
// Validate webhook URL
18+
if (![Common isValidWebhookURL:webhook]) {
19+
DDLogError(@"Slack Error - Invalid webhook URL: %@", webhook);
20+
completion(NO);
21+
return;
22+
}
23+
1724
//set slack channel url and image
1825
NSString *slackImage = abSlackImage;
1926

0 commit comments

Comments
 (0)