3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

disallow resume from tor to non-tor

This commit is contained in:
Shivaram Lingamneni 2019-02-26 16:39:10 -05:00
parent 5f26023d88
commit 18169cbedf

View File

@ -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"))