mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 14:28:20 +01:00
fix(server/user/discovery): local users don't get checked for nil, causing a nil ptr deref
This commit is contained in:
parent
5343465da4
commit
62a1a1ff83
|
|
@ -180,6 +180,9 @@ func (i *UserRepositoryImpl) Discover(ctx context.Context, domain, username stri
|
||||||
l.Error(err, "Failed to find local user", "username", username)
|
l.Error(err, "Failed to find local user", "username", username)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if u == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
l.V(2).Info("Found local user", "userURI", u.URI)
|
l.V(2).Info("Found local user", "userURI", u.URI)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue