From 70019b9b7463d3805e977d033d9215ecbb4c9ee6 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 28 May 2021 11:59:04 +0100 Subject: [PATCH] Cleansing input rows against the table schema. --- packages/server/src/utilities/rowProcessor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/utilities/rowProcessor.js b/packages/server/src/utilities/rowProcessor.js index 2267c9e986..ffcbf48d25 100644 --- a/packages/server/src/utilities/rowProcessor.js +++ b/packages/server/src/utilities/rowProcessor.js @@ -171,8 +171,9 @@ exports.inputProcessing = (user = {}, table, row) => { const copiedTable = cloneDeep(table) for (let [key, value] of Object.entries(clonedRow)) { const field = table.schema[key] + // cleanse fields that aren't in the schema if (!field) { - continue + delete clonedRow[key] } clonedRow[key] = exports.coerce(value, field.type) }