mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
fix #716
This commit is contained in:
parent
f05c6ae6e0
commit
c8ccf94936
@ -469,6 +469,17 @@ func authExternalHandler(server *Server, client *Client, mechanism string, value
|
||||
return false
|
||||
}
|
||||
|
||||
// EXTERNAL doesn't carry an authentication ID (this is determined from the
|
||||
// certificate), but does carry an optional authorization ID.
|
||||
if len(value) != 0 {
|
||||
authcid := client.Account()
|
||||
cfAuthzid, err := CasefoldName(string(value))
|
||||
if err != nil || cfAuthzid != authcid {
|
||||
rb.Add(nil, server.name, ERR_SASLFAIL, client.Nick(), client.t("SASL authentication failed: authcid and authzid should be the same"))
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
sendSuccessfulAccountAuth(client, rb, false, true)
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user