Skip to content

Safeguard against broken headers causing message processing to hang when handling incoming message - #32

Merged
mookid8000 merged 2 commits into
masterfrom
bug/bad-header
Jun 10, 2026
Merged

Safeguard against broken headers causing message processing to hang when handling incoming message#32
mookid8000 merged 2 commits into
masterfrom
bug/bad-header

Conversation

@zlepper

@zlepper zlepper commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

I'm probably being a bit overzealous with the try-catching here, however because we are so early in the Rebus pipeline (Maybe we should actually be hooking in later), if we fumble and throw an exception, then it seems Rebus just hangs.

One of our QA people found that if you manage to inject some "Zalgo" text: https://zalgo.org/ (Github apparently strips those characters completely in text messages). Then newtonsoft might throw an exception when parsing the value again. That was then causing our entire system to not process messages :)

@mookid8000
mookid8000 merged commit 696e3ac into master Jun 10, 2026
3 of 5 checks passed
@mookid8000

Copy link
Copy Markdown
Member

I agree very much with the approach. Logging and metrics collection should never, ever, be the reason why anything crashes.

I've pushed a new version as Rebus.OpenTelemetry 1.4.0 to NuGet.org just now 🙂

Thanks for contributing! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants