Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 90bb7ea666c4904dcf9a97e26d1d153d1c91d1d0 Author: Nick <nick@kousu.ca> Date: Thu Jun 13 19:10:43 2019 +0000 Verify TLS against JID domain, not the host. (xmpp) (#834) Partially fixes #820. A full fix requires patching https://github.com/matterbridge/go-xmpp to use DNS SRV records. diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index 8257b7d..2376d60 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -1007 +1007 @@ func (b *Bxmpp) Send(msg config.Message) (string, error) {    func (b *Bxmpp) createXMPP() error {   tc := &tls.Config{ - ServerName: strings.Split(b.GetString("Server"), ":")[0], + ServerName: strings.Split(b.GetString("Jid"), "@")[1],   InsecureSkipVerify: b.GetBool("SkipTLSVerify"), // nolint: gosec   }   options := xmpp.Options{