Skip to content

Commit

Permalink
Fixed panic
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Jun 14, 2023
1 parent 43b4669 commit 0253c70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/patch-3971.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix for #3971

Fixed panic described in #3971

https://github.com/cs3org/reva/pull/3972
4 changes: 2 additions & 2 deletions pkg/ocm/share/repository/nextcloud/nextcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,10 @@ func (sm *Manager) UpdateReceivedShare(ctx context.Context, user *userpb.User, s
}

func getUsername(user *userpb.User) string {
if len(user.Username) > 0 {
if user != nil && len(user.Username) > 0 {
return user.Username
}
if len(user.Id.OpaqueId) > 0 {
if user != nil && len(user.Id.OpaqueId) > 0 {
return user.Id.OpaqueId
}

Expand Down

0 comments on commit 0253c70

Please sign in to comment.