|
@@ -2159,6 +2159,8 @@ func passHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
2159
|
2159
|
rb.Add(nil, server.name, ERR_ALREADYREGISTRED, client.nick, client.t("You may not reregister"))
|
2160
|
2160
|
return false
|
2161
|
2161
|
}
|
|
2162
|
+ // only give them one try to run the PASS command (all code paths end with this
|
|
2163
|
+ // variable being set):
|
2162
|
2164
|
if rb.session.passStatus != serverPassUnsent {
|
2163
|
2165
|
return false
|
2164
|
2166
|
}
|
|
@@ -2184,6 +2186,8 @@ func passHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
2184
|
2186
|
}
|
2185
|
2187
|
}
|
2186
|
2188
|
}
|
|
2189
|
+ // if login-via-PASS failed for any reason, proceed to try and interpret the
|
|
2190
|
+ // provided password as the server password
|
2187
|
2191
|
|
2188
|
2192
|
serverPassword := config.Server.passwordBytes
|
2189
|
2193
|
|
|
@@ -2200,6 +2204,8 @@ func passHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
2200
|
2204
|
}
|
2201
|
2205
|
|
2202
|
2206
|
// if they failed the check, we'll bounce them later when they try to complete registration
|
|
2207
|
+ // note in particular that with skip-server-password, you can give the wrong server
|
|
2208
|
+ // password here, then successfully SASL and be admitted
|
2203
|
2209
|
return false
|
2204
|
2210
|
}
|
2205
|
2211
|
|