fix(cli): reject normalized agent directory names
This commit is contained in:
1 parent
f262dffc2b
commit
c234801be6
2 files changed
+2
No files matched your search
@@ -22,6 +22,7 @@ def resolve_agent_directory(root: str, agent_id: str) -> str:
|
|||||||
or "/" in agent_id
|
or "/" in agent_id
|
||||||
or "\\" in agent_id
|
or "\\" in agent_id
|
||||||
or agent_id in {".", ".."}
|
or agent_id in {".", ".."}
|
||||||
|
or agent_id.startswith(" ")
|
||||||
or agent_id.endswith((".", " "))
|
or agent_id.endswith((".", " "))
|
||||||
or _WINDOWS_DEVICE_NAME.match(agent_id)
|
or _WINDOWS_DEVICE_NAME.match(agent_id)
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ from elydora import cli
|
|||||||
"C:escape",
|
"C:escape",
|
||||||
"agent.",
|
"agent.",
|
||||||
"agent ",
|
"agent ",
|
||||||
|
" agent",
|
||||||
"CON",
|
"CON",
|
||||||
"COM¹.log",
|
"COM¹.log",
|
||||||
".",
|
".",
|
||||||
|
|||||||
Reference in new issue
Block a user