mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
fix: update security test expectations for enhanced validation messages
- Update flexible-instance-security.test.ts to match new specific error messages - Update flexible-instance-security-advanced.test.ts for enhanced validation - Improve security by removing sensitive data from validation error messages - All 37 security tests now passing Fixes CI test failures after validation enhancement 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -101,10 +101,10 @@ export function validateInstanceContext(context: InstanceContext): {
|
||||
try {
|
||||
const parsed = new URL(context.n8nApiUrl);
|
||||
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
||||
errors.push(`Invalid n8nApiUrl: ${context.n8nApiUrl} - URL must use HTTP or HTTPS protocol, got ${parsed.protocol}`);
|
||||
errors.push(`Invalid n8nApiUrl: URL must use HTTP or HTTPS protocol, got ${parsed.protocol}`);
|
||||
}
|
||||
} catch {
|
||||
errors.push(`Invalid n8nApiUrl: ${context.n8nApiUrl} - URL format is malformed or incomplete`);
|
||||
errors.push(`Invalid n8nApiUrl: URL format is malformed or incomplete`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user