This commit is contained in:
Tben 2023-08-13 12:02:58 +01:00
parent 99edb733d0
commit 4264704ce8
3 changed files with 4 additions and 5 deletions

View File

@ -53,10 +53,8 @@ module.exports = async function parseDbResults({ unparsedResults, tableSchema })
continue;
}
if (resultFieldSchema?.encrypted) {
if (value?.match(/./)) {
result[resultFieldName] = decrypt({ encryptedString: value, encryptionKey, encryptionSalt });
}
if (resultFieldSchema?.encrypted && value?.match(/./)) {
result[resultFieldName] = decrypt({ encryptedString: value, encryptionKey, encryptionSalt });
}
}

View File

@ -4,6 +4,7 @@ const { Buffer } = require("buffer");
const decrypt = ({ encryptedString, encryptionKey, encryptionSalt }) => {
if (!encryptedString?.match(/.}/)) {
console.log("Encrypted string is invalid");
console.log("Encrypted string =>", encryptedString);
return data;
}

View File

@ -1,6 +1,6 @@
{
"name": "datasquirel",
"version": "1.6.5",
"version": "1.6.6",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"bin": {