mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 06:18:34 +00:00
fix(security): harden root-scoped writes against symlink races
This commit is contained in:
@@ -217,6 +217,7 @@ beforeEach(() => {
|
||||
({
|
||||
stat: async () => makeFileStat(),
|
||||
readFile: async () => Buffer.from(""),
|
||||
truncate: async () => {},
|
||||
writeFile: async () => {},
|
||||
close: async () => {},
|
||||
}) as unknown,
|
||||
@@ -621,6 +622,7 @@ describe("agents.files.get/set symlink safety", () => {
|
||||
({
|
||||
stat: async () => targetStat,
|
||||
readFile: async () => Buffer.from("inside\n"),
|
||||
truncate: async () => {},
|
||||
writeFile: async () => {},
|
||||
close: async () => {},
|
||||
}) as unknown,
|
||||
|
||||
Reference in New Issue
Block a user