Skip to content

Commit

Permalink
fix(server/user/discovery): local users don't get checked for nil, ca…
Browse files Browse the repository at this point in the history
…using a nil ptr deref
  • Loading branch information
TheDevMinerTV committed Aug 28, 2024
1 parent 5343465 commit 62a1a1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/repository/repo_impls/user_repository_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ func (i *UserRepositoryImpl) Discover(ctx context.Context, domain, username stri
l.Error(err, "Failed to find local user", "username", username)
return nil, err
}
if u == nil {
return nil, nil
}

l.V(2).Info("Found local user", "userURI", u.URI)

Expand Down

0 comments on commit 62a1a1f

Please sign in to comment.