Browse Source

remove insecure reattach check

See #2013; given that plaintext is deprecated now, it seems like there is no
added value from continuing to police this.
tags/v2.12.0-rc1
Shivaram Lingamneni 11 months ago
parent
commit
0f39fde647
2 changed files with 1 additions and 13 deletions
  1. 0
    9
      irc/client_lookup_set.go
  2. 1
    4
      irc/server.go

+ 0
- 9
irc/client_lookup_set.go View File

@@ -195,15 +195,6 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
195 195
 			dryRun || session == nil {
196 196
 			return "", errNicknameInUse, false
197 197
 		}
198
-		// check TLS modes
199
-		if client.HasMode(modes.TLS) != currentClient.HasMode(modes.TLS) {
200
-			if useAccountName {
201
-				// #955: this is fatal because they can't fix it by trying a different nick
202
-				return "", errInsecureReattach, false
203
-			} else {
204
-				return "", errNicknameInUse, false
205
-			}
206
-		}
207 198
 		reattachSuccessful, numSessions, lastSeen, wasAway, nowAway := currentClient.AddSession(session)
208 199
 		if !reattachSuccessful {
209 200
 			return "", errNicknameInUse, false

+ 1
- 4
irc/server.go View File

@@ -359,10 +359,7 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
359 359
 	rb := NewResponseBuffer(session)
360 360
 	nickError := performNickChange(server, c, c, session, c.preregNick, rb)
361 361
 	rb.Send(true)
362
-	if nickError == errInsecureReattach {
363
-		c.Quit(c.t("You can't mix secure and insecure connections to this account"), nil)
364
-		return true
365
-	} else if nickError != nil {
362
+	if nickError != nil {
366 363
 		c.preregNick = ""
367 364
 		return false
368 365
 	}

Loading…
Cancel
Save