Skip to content

Protect file system body storage from malformed message ids - #6189

Merged
rbev merged 2 commits into
masterfrom
fix-body-storage-outside-writes
Nov 26, 2026
Merged

rbev merged 2 commits into
masterfrom
fix-body-storage-outside-writes

Conversation

@rbev

@rbev rbev commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Resolve error-ingestion message IDs to GUIDs before starting external body writes. A malformed ServiceControl.Retry.UniqueMessageId header could become a file path before the later Guid.Parse rejected the
message.

Error ingestion follows Audit’s conversion: parse valid GUIDs and convert other strings with DeterministicGuid.MakeId. It computes the GUID once, uses its canonical string for body storage, and assigns the same
GUID to the database record.

Both filesystem stores validate IDs before filesystem access. Error storage preserves failedimport-{guid} IDs, and Audit validates before creating the hour directory.

Normal retry handling remains unchanged. ServiceControl overwrites the retry header with the stored GUID before sending the retry, so success acknowledgements carry the normalized ID.

@johnsimons johnsimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbev
rbev enabled auto-merge (squash) November 26, 2026 03:44
@rbev
rbev disabled auto-merge November 26, 2026 03:44
@rbev
rbev requested a review from johnsimons November 26, 2026 03:58
@rbev
rbev merged commit 9601ca1 into master Nov 26, 2026
70 checks passed
@rbev
rbev deleted the fix-body-storage-outside-writes branch November 26, 2026 04:39
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