fix(cli): reject normalized agent directory names
This commit is contained in:
1 parent
856ae5313e
commit
924bed6c21
2 files changed
+2
No files matched your search
@@ -26,6 +26,7 @@ export function resolvePrivateChildDirectory(root: string, childName: string): s
|
||||
|| childName.includes('\\')
|
||||
|| childName === '.'
|
||||
|| childName === '..'
|
||||
|| childName.startsWith(' ')
|
||||
|| childName.endsWith('.')
|
||||
|| childName.endsWith(' ')
|
||||
|| isWindowsDeviceName
|
||||
|
||||
@@ -109,6 +109,7 @@ test('CLI rejects agent IDs that escape the credential directory', async () => {
|
||||
'C:escape',
|
||||
'agent.',
|
||||
'agent ',
|
||||
' agent',
|
||||
'CON',
|
||||
'COM¹.log',
|
||||
'.',
|
||||
|
||||
Reference in new issue
Block a user