mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: Add path validation for optional params in test runner routes
Add path validation middleware for optional projectPath and worktreePath parameters in test runner routes to maintain parity with other worktree routes and ensure proper security validation when ALLOWED_ROOT_DIRECTORY is configured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -146,11 +146,11 @@ export function createWorktreeRoutes(
|
||||
// Test runner routes
|
||||
router.post(
|
||||
'/start-tests',
|
||||
validatePathParams('worktreePath'),
|
||||
validatePathParams('worktreePath', 'projectPath?'),
|
||||
createStartTestsHandler(settingsService)
|
||||
);
|
||||
router.post('/stop-tests', createStopTestsHandler());
|
||||
router.get('/test-logs', createGetTestLogsHandler());
|
||||
router.get('/test-logs', validatePathParams('worktreePath?'), createGetTestLogsHandler());
|
||||
|
||||
// Init script routes
|
||||
router.get('/init-script', createGetInitScriptHandler());
|
||||
|
||||
Reference in New Issue
Block a user