mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +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
|
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)
|
sendSuccessfulAccountAuth(client, rb, false, true)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user