https://github.com/aws/aws-sdk-js-v3/issues/2362 Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} aws / aws-sdk-js-v3 * Notifications * Star 840 * Fork 133 * Code * Issues 229 * Pull requests 22 * Discussions * Actions * Projects 2 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights New issue Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Pick a username [ ] Email Address [ ] Password [ ] [ ] Sign up for GitHub By clicking "Sign up for GitHub", you agree to our terms of service and privacy statement. We'll occasionally send you account related emails. Already on GitHub? Sign in to your account Jump to bottom ZA[?]LGO causes "Invalid MD5 checksum on messages" #2362 Open pauldraper opened this issue May 8, 2021 * 0 comments * May be fixed by #2364 Open ZA[?]LGO causes "Invalid MD5 checksum on messages" #2362 pauldraper opened this issue May 8, 2021 * 0 comments * May be fixed by #2364 Labels bug needs-triage Comments @pauldraper Copy link @pauldraper pauldraper commented May 8, 2021 * edited The unholy child weeps the blood of virgins, the tainted souls are summoned into the realm of the living, dooming humanity to an eternity of dread torture, transporting the programmer's consciousness into a world of ceaseless screaming. You have summoned Zalgo. const decodeEscapedXML = (str: string) => str .replace(/&/g, "&") .replace(/'/g, "'") .replace(/"/g, '"') .replace(/>/g, ">") .replace(/</g, "<"); https://github.com/aws/aws-sdk-js-v3/blob/v3.14.0/clients/client-sqs/ protocols/Aws_query.ts#L3133-L3139 Maybe try using an XML parser instead? --------------------------------------------------------------------- There are multiple obvious problems with this: 1. decodes to (wrong) not carriage return (correct) 2. &lt; decodes to < (wrong) not < (correct) Thanks to (1), all my HL7 messages in my SQS FIFO queue won't process because carriage returns broke the client. I haven't run into (2), but I'm sure I will eventually. Such is the life of the foolish souls who parse XML with regex. (Silver lining is thanks to the MD5 checksum, this bug only causes unavailability instead of corruption.) The text was updated successfully, but these errors were encountered: 80 51 @pauldraper pauldraper added bug needs-triage labels May 8, 2021 pauldraper added a commit to pauldraper/aws-sdk-js-v3 that referenced this issue May 8, 2021 @pauldraper fix(clients): properly decode SQS messages ... 84f7dcd Fixes aws#2362. @pauldraper pauldraper linked a pull request that will close this issue May 8, 2021 fix(clients): properly decode SQS messages #2364 Open Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Assignees No one assigned Labels bug needs-triage Projects None yet Milestone No milestone Linked pull requests Successfully merging a pull request may close this issue. fix(clients): properly decode SQS messages 1 participant @pauldraper * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.