소스 검색

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

Loading…
취소
저장