Explorar el Código

disallow resume from tor to non-tor

tags/v1.1.0-rc1
Shivaram Lingamneni hace 5 años
padre
commit
18169cbedf
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5
    0
      irc/client.go

+ 5
- 0
irc/client.go Ver fichero

@@ -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…
Cancelar
Guardar