sensedeep / dynamodb-onetable

DynamoDB access and management for one table designs with NodeJS
https://doc.onetable.io/
MIT License
689 stars 109 forks source link

FIX: #523 correctly ignore JSON strings in decryption #524

Closed vectorhacker closed 8 months ago

vectorhacker commented 8 months ago

This adds a check for JSON stringified objects before trying to decrypt. Addresses issue #523

mobsense commented 8 months ago

Hi,

If you change from encrypted to unencrypted or vice-versa, you should perform a database migration to change those fields.

Alternatively, read without a schema and update the time.

Your PR suggests handling JSON encodings, but there could be any other formats that your PR won't address.

So I'd rather not apply the PR to handle just one such case out of a potential large set of encodings.