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.includes('\\')
|
||||||
|| childName === '.'
|
|| childName === '.'
|
||||||
|| childName === '..'
|
|| childName === '..'
|
||||||
|
|| childName.startsWith(' ')
|
||||||
|| childName.endsWith('.')
|
|| childName.endsWith('.')
|
||||||
|| childName.endsWith(' ')
|
|| childName.endsWith(' ')
|
||||||
|| isWindowsDeviceName
|
|| isWindowsDeviceName
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ test('CLI rejects agent IDs that escape the credential directory', async () => {
|
|||||||
'C:escape',
|
'C:escape',
|
||||||
'agent.',
|
'agent.',
|
||||||
'agent ',
|
'agent ',
|
||||||
|
' agent',
|
||||||
'CON',
|
'CON',
|
||||||
'COM¹.log',
|
'COM¹.log',
|
||||||
'.',
|
'.',
|
||||||
|
|||||||
Reference in new issue
Block a user