From 55b755b2df7e186df8fb253742478bca146fbf46 Mon Sep 17 00:00:00 2001 From: Sammy Date: Wed, 16 Aug 2023 00:57:56 +0200 Subject: [PATCH] InvisibleChat: improve encryption validator (#1646) --- src/plugins/invisibleChat/components/EncryptionModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/invisibleChat/components/EncryptionModal.tsx b/src/plugins/invisibleChat/components/EncryptionModal.tsx index 570b4c075..f893680d4 100644 --- a/src/plugins/invisibleChat/components/EncryptionModal.tsx +++ b/src/plugins/invisibleChat/components/EncryptionModal.tsx @@ -35,7 +35,7 @@ function EncModal(props: ModalProps) { const [password, setPassword] = React.useState("password"); const [noCover, setNoCover] = React.useState(false); - const isValid = secret && (noCover || (cover && /\w \w/.test(cover))); + const isValid = secret && (noCover || (cover && cover.trim().split(" ").length > 1)); return (