From df6b3ed77a934baa36c32dc74f383a088e36b0d4 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 30 Nov 2021 09:29:38 -0500 Subject: [PATCH] Require at least a dot in a JID --- sgx_jmp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgx_jmp.rb b/sgx_jmp.rb index e08b52c..67e9a09 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -714,7 +714,7 @@ command :execute?, node: "web-register" do |iq| sentry_hub.current_scope.set_user(jid: jid, tel: tel) if iq.from.stripped != CONFIG[:web_register][:from] BLATHER << iq.as_error("forbidden", :auth) - elsif jid == "" || tel !~ /\A\+\d+\Z/ + elsif jid !~ /\./ || tel !~ /\A\+\d+\Z/ reply_with_note(iq, "Invalid JID or telephone number.", type: :error) else IQ_MANAGER.write(Blather::Stanza::Iq::Command.new.tap { |cmd| -- 2.34.5