From abed8df4c9a06c97a6254ea787054659845e3266 Mon Sep 17 00:00:00 2001 From: Viren070 Date: Wed, 30 Apr 2025 14:23:52 +0100 Subject: [PATCH] fix(frontend): use Buffer.from for utf-8 encoding when loading existing configurations --- packages/frontend/src/app/configure/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/app/configure/page.tsx b/packages/frontend/src/app/configure/page.tsx index 6d979967..77b3d25e 100644 --- a/packages/frontend/src/app/configure/page.tsx +++ b/packages/frontend/src/app/configure/page.tsx @@ -489,7 +489,9 @@ export default function Configure() { if (isValueEncrypted(config) || config.startsWith('B-')) { throw new Error('Encrypted Config Not Supported'); } else { - decodedConfig = JSON.parse(atob(decodeURIComponent(config))); + decodedConfig = JSON.parse( + Buffer.from(decodeURIComponent(config), 'base64').toString('utf-8') + ); } return decodedConfig; }