From 0196e3b95373b04e7e6f3eb66ede3d55a898f6a7 Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 1 Feb 2023 23:24:03 -0500 Subject: [PATCH] Update to attachment.go Update for guard checking prior to dereferencing pointer. Failure to do so causes panic on some text cases. --- src/internal/connector/exchange/attachment.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/internal/connector/exchange/attachment.go b/src/internal/connector/exchange/attachment.go index 34726a4aa..8f75c52b9 100644 --- a/src/internal/connector/exchange/attachment.go +++ b/src/internal/connector/exchange/attachment.go @@ -55,8 +55,12 @@ func uploadAttachment( // item Attachments to be skipped until the completion of Issue #2353 if attachmentType == models.ITEM_ATTACHMENTTYPE { + name := "" + if attachment.GetName() != nil{ + name := *attachment.GetName() + } logger.Ctx(ctx).Infow("item attachment uploads are not supported ", - "attachment_name", *attachment.GetName(), // TODO: Update to support PII protection + "attachment_name", name, // TODO: Update to support PII protection "attachment_type", attachmentType, "internal_item_type", getItemAttachmentItemType(attachment), "attachment_id", *attachment.GetId(),