fix: remove dead try/catch in insertNode; fix SENSITIVE_PATHS case-sensitivity (#327)
Drop the no-op try/catch around insertNode.run, and lowercase the Windows SENSITIVE_PATHS entries so validateProjectPath's case-insensitive check actually blocks c:\windows. Adds a validateProjectPath test (POSIX + Windows-gated); the Windows-gated case was validated on a real Windows 11 VM. Closes #327
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ import * as path from 'path';
|
||||
const SENSITIVE_PATHS = new Set([
|
||||
'/', '/etc', '/usr', '/bin', '/sbin', '/var', '/tmp', '/dev', '/proc', '/sys',
|
||||
'/root', '/boot', '/lib', '/lib64', '/opt',
|
||||
'C:\\', 'C:\\Windows', 'C:\\Windows\\System32',
|
||||
'c:\\', 'c:\\windows', 'c:\\windows\\system32',
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user