Socket
Socket
Sign inDemoInstall

dexie-encrypted

Package Overview
Dependencies
13
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-beta.2 to 2.0.0-beta.3

14

dist/installHooks.js

@@ -61,3 +61,15 @@ "use strict";

const { __encryptedData } = entity, unencryptedFields = tslib_1.__rest(entity, ["__encryptedData"]);
const decrypted = performDecryption(encryptionKey, __encryptedData);
let decrypted = performDecryption(encryptionKey, __encryptedData);
// There is a bug that causes double encryption. I am not sure what causes it,
// it is very rare and I have no repro steps. I believe the hook is running twice
// in very rare circumstances, but I have no evidence of it.
// This decrypts until all decryption is done. The only circumstance where it will
// create an undesireable result is if your data has an __encryptedData key, and
// that data can be decrypted by the performDecryption function.
while (decrypted.__encryptedData) {
const decryptionAttempt = performDecryption(encryptionKey, decrypted.__encryptedData);
if (decryptionAttempt) {
decrypted = decryptionAttempt;
}
}
return Object.assign(Object.assign({}, unencryptedFields), decrypted);

@@ -64,0 +76,0 @@ }

2

package.json
{
"name": "dexie-encrypted",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Encryption middleware for Dexie",

@@ -5,0 +5,0 @@ "main": "dist",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc