mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 22:51:23 +00:00
fix: land security audit severity + temp-path guard fixes (#23428) (thanks @bmendonca3)
This commit is contained in:
@@ -50,7 +50,8 @@ export function makeRuntime(params?: { throwOnError?: boolean }): {
|
||||
}
|
||||
|
||||
export function writeStore(data: unknown, prefix = "sessions"): string {
|
||||
const file = path.join(os.tmpdir(), `${prefix}-${Date.now()}-${randomUUID()}.json`);
|
||||
const fileName = `${[prefix, Date.now(), randomUUID()].join("-")}.json`;
|
||||
const file = path.join(os.tmpdir(), fileName);
|
||||
fs.writeFileSync(file, JSON.stringify(data, null, 2));
|
||||
return file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user