From 18169cbedf5385d36e3b2863b186c485bc167b6b Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 26 Feb 2019 16:39:10 -0500 Subject: [PATCH] disallow resume from tor to non-tor --- irc/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc/client.go b/irc/client.go index 843c3cf0..3ae9ac22 100644 --- a/irc/client.go +++ b/irc/client.go @@ -418,6 +418,11 @@ func (client *Client) tryResume() (success bool) { return } + if oldClient.isTor != client.isTor { + client.Send(nil, server.name, "RESUME", "ERR", client.t("Cannot resume connection from Tor to non-Tor or vice versa")) + return + } + err := server.clients.Resume(client, oldClient) if err != nil { client.Send(nil, server.name, "RESUME", "ERR", client.t("Cannot resume connection"))