浏览代码

disallow resume from tor to non-tor

tags/v1.1.0-rc1
Shivaram Lingamneni 5 年前
父节点
当前提交
18169cbedf
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      irc/client.go

+ 5
- 0
irc/client.go 查看文件

@@ -418,6 +418,11 @@ func (client *Client) tryResume() (success bool) {
418 418
 		return
419 419
 	}
420 420
 
421
+	if oldClient.isTor != client.isTor {
422
+		client.Send(nil, server.name, "RESUME", "ERR", client.t("Cannot resume connection from Tor to non-Tor or vice versa"))
423
+		return
424
+	}
425
+
421 426
 	err := server.clients.Resume(client, oldClient)
422 427
 	if err != nil {
423 428
 		client.Send(nil, server.name, "RESUME", "ERR", client.t("Cannot resume connection"))

正在加载...
取消
保存