mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 20:17:03 +00:00
fix: close bar launch case bypass (#1613)
This commit is contained in:
1 parent
0e097f3301
commit
3f1dce30bc
3 files changed
+28
-10
No files matched your search
@@ -50,6 +50,14 @@ describe('validateFilePath', () => {
|
||||
expect(result.readonly).toBe(false);
|
||||
});
|
||||
|
||||
test('rejects case variants of the macOS bar launch descriptor', () => {
|
||||
const filePath = path.join(tempDir, '.ccs', 'BAR', 'LAUNCH.JSON');
|
||||
const result = validateFilePath(filePath);
|
||||
|
||||
expect(result.valid).toBe(false);
|
||||
expect(result.readonly).toBe(false);
|
||||
});
|
||||
|
||||
test('still allows other writes inside the bar directory', () => {
|
||||
const filePath = path.join(tempDir, '.ccs', 'bar', 'serve.log');
|
||||
const result = validateFilePath(filePath);
|
||||
|
||||
Reference in new issue
Block a user