Skip to content

Commit

Permalink
fix(middleware-sdk-sqs): Fix MD5 verification on SendMessageBatch. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogunPanda authored Nov 23, 2020
1 parent 86352d3 commit 049f45e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/middleware-sdk-sqs/src/send-message-batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function sendMessageBatchMiddleware(options: PreviouslyResolved): Initial
if (entries[entry.Id]) {
const md5 = entries[entry.Id].MD5OfMessageBody;
const hash = new options.md5();
hash.update(entry.MD5OfMessageBody || "");
hash.update(entry.MessageBody || "");
if (md5 !== toHex(await hash.digest())) {
messageIds.push(entries[entry.Id].MessageId);
}
Expand Down

0 comments on commit 049f45e

Please sign in to comment.