diff --git a/apps/server/src/services/integration-service/HttpIntegration.ts b/apps/server/src/services/integration-service/HttpIntegration.ts index a3e0f5ecc..6689019e3 100644 --- a/apps/server/src/services/integration-service/HttpIntegration.ts +++ b/apps/server/src/services/integration-service/HttpIntegration.ts @@ -83,9 +83,20 @@ export class HttpIntegration implements IIntegration { const parsedMessage = parseTemplateNested(message, state || {}); try { const parsedUrl = new URL(parsedMessage); + if (parsedUrl.protocol !== 'http:') { + logger.error(LogOrigin.Tx, `HTTP Integration: Only HTTP allowed, got ${parsedUrl.protocol}`); + return { + success: false, + message: `Only HTTP allowed, got ${parsedUrl.protocol}`, + }; + } this.emit(parsedUrl); } catch (err) { logger.error(LogOrigin.Tx, `HTTP Integration: ${err}`); + return { + success: false, + message: `${err}`, + }; } } });