fix(cli): reject normalized agent directory names

This commit is contained in:
ZacharyZhang-NY committed 2026-07-19 16:28:38 -04:00
1 parent f262dffc2b
commit c234801be6
2 files changed
+2

No files matched your search

+1
View File
@@ -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)
): ):
+1
View File
@@ -22,6 +22,7 @@ from elydora import cli
"C:escape", "C:escape",
"agent.", "agent.",
"agent ", "agent ",
" agent",
"CON", "CON",
"COM¹.log", "COM¹.log",
".", ".",