Files
api/services/nginx/app/tests/Unit/N8n/N8nWebhookUrlValidationWiringTest.php
T
Jeppe B 2a6a86c9c3 Resolve backend Qodana critical and high findings (#314)
Resolve recommended-profile Critical and High findings, retain narrow analyzer exceptions, and update the edge-broker WebSocket dependency to a non-vulnerable release.
2026-07-17 05:44:16 +02:00

14 lines
585 B
PHP

<?php
it('restricts absolute webhook URLs to configured n8n webhook host', function (): void {
$classFile = app_path('classes/n8n.php');
$content = file_get_contents($classFile);
expect($content)->not->toBeFalse();
expect($content)->toContain('isAllowedWebhookAbsoluteUrl');
expect($content)->toContain('Webhook URL must use the configured n8n webhook host.');
expect($content)->toContain('$targetHost !== $baseHost');
expect($content)->toContain('$targetScheme !== $baseScheme');
expect($content)->toContain('return $targetPort === $basePort;');
});