Browse Source

DEFCON 4 and lower should require SASL from Tor users

tags/v2.5.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
534939c342
2 changed files with 3 additions and 2 deletions
  1. 1
    1
      irc/client.go
  2. 2
    1
      irc/help.go

+ 1
- 1
irc/client.go View File

@@ -596,7 +596,7 @@ func (client *Client) isAuthorized(server *Server, config *Config, session *Sess
596 596
 		return authFailPass
597 597
 	}
598 598
 	// Tor connections may be required to authenticate with SASL
599
-	if session.isTor && config.Server.TorListeners.RequireSasl && !saslSent {
599
+	if session.isTor && !saslSent && (config.Server.TorListeners.RequireSasl || server.Defcon() <= 4) {
600 600
 		return authFailTorSaslRequired
601 601
 	}
602 602
 	// finally, enforce require-sasl

+ 2
- 1
irc/help.go View File

@@ -182,7 +182,8 @@ spam or other hostile activity. It has five levels, which are cumulative
182 182
 (i.e., level 3 includes all restrictions from level 4 and so on):
183 183
 
184 184
 5: Normal operation
185
-4: No new account or channel registrations
185
+4: No new account or channel registrations; if Tor is enabled, no new
186
+   unauthenticated connections from Tor
186 187
 3: All users are +R; no changes to vhosts
187 188
 2: No new unauthenticated connections; all channels are +R
188 189
 1: No new connections except from localhost or other trusted IPs`,

Loading…
Cancel
Save