From 828da8b4d705e6afdb516ac363f5da075d05d108 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 29 Sep 2021 13:51:33 +0100 Subject: [PATCH 1/3] Honour cookie domain on empty values --- packages/auth/src/utils.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/auth/src/utils.js b/packages/auth/src/utils.js index f03ae300f7..93b483c6be 100644 --- a/packages/auth/src/utils.js +++ b/packages/auth/src/utils.js @@ -67,24 +67,22 @@ exports.getCookie = (ctx, name) => { * @param {string|object} value The value of cookie which will be set. */ exports.setCookie = (ctx, value, name = "builder") => { - if (!value) { - ctx.cookies.set(name) - } else { + if (value) { value = jwt.sign(value, options.secretOrKey) - - const config = { - maxAge: Number.MAX_SAFE_INTEGER, - path: "/", - httpOnly: false, - overwrite: true, - } - - if (environment.COOKIE_DOMAIN) { - config.domain = environment.COOKIE_DOMAIN - } - - ctx.cookies.set(name, value, config) } + + const config = { + maxAge: Number.MAX_SAFE_INTEGER, + path: "/", + httpOnly: false, + overwrite: true, + } + + if (environment.COOKIE_DOMAIN) { + config.domain = environment.COOKIE_DOMAIN + } + + ctx.cookies.set(name, value, config) } /** From de10f3691f0ac5a63078faa43313b3a3a6f69e7b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 29 Sep 2021 13:01:12 +0000 Subject: [PATCH 2/3] v0.9.144-alpha.1 --- lerna.json | 2 +- packages/auth/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 8 ++++---- packages/cli/package.json | 2 +- packages/client/package.json | 6 +++--- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lerna.json b/lerna.json index ed1c098f67..618add8538 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 067a5e66f6..d724a768e1 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 9d6488ccf7..4cba4af1c3 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index 3da87b5653..2b331f4189 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.144-alpha.0", - "@budibase/client": "^0.9.144-alpha.0", + "@budibase/bbui": "^0.9.144-alpha.1", + "@budibase/client": "^0.9.144-alpha.1", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.144-alpha.0", + "@budibase/string-templates": "^0.9.144-alpha.1", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 17d038227d..ba5aeccb38 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 487d2c63f5..e6db830449 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^0.9.144-alpha.0", + "@budibase/bbui": "^0.9.144-alpha.1", "@budibase/standard-components": "^0.9.139", - "@budibase/string-templates": "^0.9.144-alpha.0", + "@budibase/string-templates": "^0.9.144-alpha.1", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" diff --git a/packages/server/package.json b/packages/server/package.json index e45c2620ee..7b75db52d4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "description": "Budibase Web Server", "main": "src/index.js", "repository": { @@ -64,9 +64,9 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.144-alpha.0", - "@budibase/client": "^0.9.144-alpha.0", - "@budibase/string-templates": "^0.9.144-alpha.0", + "@budibase/auth": "^0.9.144-alpha.1", + "@budibase/client": "^0.9.144-alpha.1", + "@budibase/string-templates": "^0.9.144-alpha.1", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index ed41d23143..1199da30bf 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 66261e8f2e..16ec374a87 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "0.9.144-alpha.0", + "version": "0.9.144-alpha.1", "description": "Budibase background service", "main": "src/index.js", "repository": { @@ -25,8 +25,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.144-alpha.0", - "@budibase/string-templates": "^0.9.144-alpha.0", + "@budibase/auth": "^0.9.144-alpha.1", + "@budibase/string-templates": "^0.9.144-alpha.1", "@koa/router": "^8.0.0", "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.811.0", From b8a33d50370fe1b1cf9903288a6021b7916283b9 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 29 Sep 2021 13:36:20 +0000 Subject: [PATCH 3/3] v0.9.145-alpha.0 --- lerna.json | 2 +- packages/auth/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 8 ++++---- packages/cli/package.json | 2 +- packages/client/package.json | 6 +++--- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lerna.json b/lerna.json index 3cef49d3e8..ea10419669 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.144", + "version": "0.9.145-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 46eeaf0ab5..3c61260dcb 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index f0d89bb12e..d86ac8bb08 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index e25cfdfbd6..699f33d9c9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.144", - "@budibase/client": "^0.9.144", + "@budibase/bbui": "^0.9.145-alpha.0", + "@budibase/client": "^0.9.145-alpha.0", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.144", + "@budibase/string-templates": "^0.9.145-alpha.0", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 12baaeb850..04ff7d7a42 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 245e26d9e4..4dbd5fe8f7 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^0.9.144", + "@budibase/bbui": "^0.9.145-alpha.0", "@budibase/standard-components": "^0.9.139", - "@budibase/string-templates": "^0.9.144", + "@budibase/string-templates": "^0.9.145-alpha.0", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" diff --git a/packages/server/package.json b/packages/server/package.json index 30a85c92ec..2efc5149d7 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "description": "Budibase Web Server", "main": "src/index.js", "repository": { @@ -64,9 +64,9 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.144", - "@budibase/client": "^0.9.144", - "@budibase/string-templates": "^0.9.144", + "@budibase/auth": "^0.9.145-alpha.0", + "@budibase/client": "^0.9.145-alpha.0", + "@budibase/string-templates": "^0.9.145-alpha.0", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 7c52545445..ba161c9b47 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 7b84891594..4b5acd7baf 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "0.9.144", + "version": "0.9.145-alpha.0", "description": "Budibase background service", "main": "src/index.js", "repository": { @@ -25,8 +25,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.144", - "@budibase/string-templates": "^0.9.144", + "@budibase/auth": "^0.9.145-alpha.0", + "@budibase/string-templates": "^0.9.145-alpha.0", "@koa/router": "^8.0.0", "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.811.0",