From e09764cd58b9f163348fac0815cdbee8f5b2e14c Mon Sep 17 00:00:00 2001 From: Kent Wang Date: Thu, 13 Aug 2026 10:33:59 +0800 Subject: [PATCH] fix: JSON format vault config is showing in the tag when edit credential (#10384) * fix issue * more safe way to btoa --- .../templating/external-vault/external-vault-form.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx b/packages/insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx index 6f8e464231..4d02e637df 100644 --- a/packages/insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx +++ b/packages/insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx @@ -122,7 +122,12 @@ export const ExternalVaultForm = (props: ArgConfigFormProps) => { provider={provider} providerCredential={selectedCredentialDoc} onClose={() => setShowModal(false)} - onComplete={() => onChange(configValue)} + onComplete={() => + onChange( + // convert the configValue to base64 string to avoid special characters in the configValue + btoa(new TextEncoder().encode(configValue).reduce((data, byte) => data + String.fromCodePoint(byte), '')), + ) + } /> )}