Procházet zdrojové kódy

disallow resume from tor to non-tor

tags/v1.1.0-rc1
Shivaram Lingamneni před 5 roky
rodič
revize
18169cbedf
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5
    0
      irc/client.go

+ 5
- 0
irc/client.go Zobrazit soubor

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

Načítá se…
Zrušit
Uložit