test: remove low-value absolute-in-dir session-file happy path
This commit is contained in:
@@ -86,18 +86,6 @@ describe("session path safety", () => {
|
||||
).toThrow(/within sessions directory/);
|
||||
});
|
||||
|
||||
it("accepts absolute sessionFile paths that resolve within the sessions dir", () => {
|
||||
const sessionsDir = "/tmp/openclaw/agents/main/sessions";
|
||||
|
||||
const resolved = resolveSessionFilePath(
|
||||
"sess-1",
|
||||
{ sessionFile: "/tmp/openclaw/agents/main/sessions/abc-123.jsonl" },
|
||||
{ sessionsDir },
|
||||
);
|
||||
|
||||
expect(resolved).toBe(path.resolve(sessionsDir, "abc-123.jsonl"));
|
||||
});
|
||||
|
||||
it("rejects absolute sessionFile paths outside known agent sessions dirs", () => {
|
||||
const sessionsDir = "/tmp/openclaw/agents/main/sessions";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user