From ec02d667f0f0dbb00c57ee787ab90484e993f482 Mon Sep 17 00:00:00 2001 From: Elias Dalbeck Date: Wed, 25 Sep 2024 16:21:17 +0200 Subject: [PATCH] wormhole code validation length check --- cli/src/reedline.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/src/reedline.rs b/cli/src/reedline.rs index dce86272..e21ae1cb 100644 --- a/cli/src/reedline.rs +++ b/cli/src/reedline.rs @@ -147,6 +147,11 @@ impl CodeHighliter { return false; } + // Minimum code length + if parts.len() < 3 { + return false; + } + // Check all words for validity parts.iter().skip(1).all(|&word| { WORDLIST