diff --git a/app/server/utils/crypto.ts b/app/server/utils/crypto.ts index 97e87e85..a310d911 100644 --- a/app/server/utils/crypto.ts +++ b/app/server/utils/crypto.ts @@ -38,7 +38,14 @@ const encrypt = async (data: string) => { } if (isEncrypted(data)) { - return data; + try { + await decrypt(data); + return data; + } catch { + throw new Error( + "You have provided an encrypted value that cannot be decrypted with the current APP_SECRET. Please use a plain text value.", + ); + } } const salt = crypto.randomBytes(16);