From a5c92357e9ff6da2dff3ed3993ef6892bac07098 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 7 Feb 2023 14:51:49 -0500 Subject: [PATCH] JID cannot contain whitespace --- sgx_jmp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgx_jmp.rb b/sgx_jmp.rb index 442010706fc56f9a9893de8de1a0f41350fecd02..9622812ec8c16a4e56db063250aa856b6a7e69ff 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -904,7 +904,7 @@ Command.new( }.then do |iq| jid = iq.form.field("jid")&.value.to_s.strip tel = iq.form.field("tel")&.value.to_s.strip - if jid !~ /\./ + if jid !~ /\./ || jid =~ /\s/ Command.finish("The Jabber ID you entered was not valid.", type: :error) elsif tel !~ /\A\+\d+\Z/ Command.finish("Invalid telephone number", type: :error)