mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:11:24 +00:00
test: remove low-value positive session-id validation case
This commit is contained in:
@@ -66,11 +66,6 @@ describe("resolveStorePath", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("session path safety", () => {
|
describe("session path safety", () => {
|
||||||
it("validates safe session IDs", () => {
|
|
||||||
expect(validateSessionId("sess-1")).toBe("sess-1");
|
|
||||||
expect(validateSessionId("ABC_123.hello")).toBe("ABC_123.hello");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("rejects unsafe session IDs", () => {
|
it("rejects unsafe session IDs", () => {
|
||||||
expect(() => validateSessionId("../etc/passwd")).toThrow(/Invalid session ID/);
|
expect(() => validateSessionId("../etc/passwd")).toThrow(/Invalid session ID/);
|
||||||
expect(() => validateSessionId("a/b")).toThrow(/Invalid session ID/);
|
expect(() => validateSessionId("a/b")).toThrow(/Invalid session ID/);
|
||||||
|
|||||||
Reference in New Issue
Block a user