Fix nil pointer derefernce when QueryAccountByPassword

This commit is contained in:
Till Faelligen 2024-05-22 20:39:24 +02:00
parent 56c979d117
commit be13f7a011
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -939,11 +939,12 @@ func (a *UserInternalAPI) QueryAccountByPassword(ctx context.Context, req *api.Q
return nil return nil
case bcrypt.ErrHashTooShort: // user exists, but probably a passwordless account case bcrypt.ErrHashTooShort: // user exists, but probably a passwordless account
return nil return nil
default: case nil:
res.Exists = true res.Exists = true
res.Account = acc res.Account = acc
return nil return nil
} }
return err
} }
func (a *UserInternalAPI) SetDisplayName(ctx context.Context, localpart string, serverName spec.ServerName, displayName string) (*authtypes.Profile, bool, error) { func (a *UserInternalAPI) SetDisplayName(ctx context.Context, localpart string, serverName spec.ServerName, displayName string) (*authtypes.Profile, bool, error) {