Fix nil pointer derefernce when QueryAccountByPassword
This commit is contained in:
parent
56c979d117
commit
be13f7a011
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue