1
0
Fork 0
forked from External/ergo

fix SCRAM not supporting client IDs

reported by @Mikaela
This commit is contained in:
Shivaram Lingamneni 2021-08-03 11:47:00 -04:00
parent b13776787b
commit 117401f293
2 changed files with 16 additions and 4 deletions

View file

@ -2008,6 +2008,11 @@ func (am *AccountManager) NewScramConversation() *scram.ServerConversation {
}
func (am *AccountManager) lookupSCRAMCreds(accountName string) (creds scram.StoredCredentials, err error) {
// strip client ID if present:
if strudelIndex := strings.IndexByte(accountName, '@'); strudelIndex != -1 {
accountName = accountName[:strudelIndex]
}
acct, err := am.LoadAccount(accountName)
if err != nil {
return