From a27a9dc2afb2246f64ee1b1333f300290e9b3b5a Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Fri, 3 Nov 2023 14:29:54 +0000 Subject: [PATCH 1/2] Eliminate TOCTOU problem in creating bbTmp. --- packages/backend-core/src/objectStore/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/src/objectStore/utils.ts b/packages/backend-core/src/objectStore/utils.ts index dba5f3d1c2..4c3a84ba91 100644 --- a/packages/backend-core/src/objectStore/utils.ts +++ b/packages/backend-core/src/objectStore/utils.ts @@ -18,8 +18,12 @@ export const ObjectStoreBuckets = { } const bbTmp = join(tmpdir(), ".budibase") -if (!fs.existsSync(bbTmp)) { +try { fs.mkdirSync(bbTmp) +} catch (e: any) { + if (e.code !== "EEXIST") { + throw e + } } export function budibaseTempDir() { From 8fed47766aa514936aec4e41c1a64a9d0d3e4fdc Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 3 Nov 2023 15:42:25 +0000 Subject: [PATCH 2/2] Bump version to 2.12.10 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 2deb06656d..9257a36444 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.12.9", + "version": "2.12.10", "npmClient": "yarn", "packages": [ "packages/*"