mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
fix: resolve final template security test failures
- Fix getTemplatesByCategory to use parameterized SQL concatenation - Fix searchTemplatesByMetadata to handle empty string filters - Change truthy checks to explicit undefined checks for filter parameters - Update test expectations to match secure parameterization patterns All 21 tests in template-repository-security.test.ts now pass ✓ 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -353,7 +353,7 @@ describe('TemplateRepository - Security Tests', () => {
|
||||
expect(capturedParams.length).toBeGreaterThan(0);
|
||||
// Find the parameter that contains 'test'
|
||||
const testParam = capturedParams[0].find((p: any) => typeof p === 'string' && p.includes('test'));
|
||||
expect(testParam).toBe('%"test"%');
|
||||
expect(testParam).toBe('test');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user