Skip to content

fix: Recompute Content-Digest header value when signing content-digest component#116

Merged
dadrus merged 2 commits into
mainfrom
fix/always_recompute_content_digest
May 15, 2026
Merged

fix: Recompute Content-Digest header value when signing content-digest component#116
dadrus merged 2 commits into
mainfrom
fix/always_recompute_content_digest

Conversation

@dadrus
Copy link
Copy Markdown
Owner

@dadrus dadrus commented May 15, 2026

This PR changes the signing behavior for the content-digest component.

When content-digest is configured as one of the signature components, the signer now always recomputes the Content-Digest header from the current message body and replaces any existing value.

Previously, an existing Content-Digest header was preserved. If that header was stale or incorrect, signing could produce a message that fails verification because the signed digest no longer matches the body.

@dadrus dadrus changed the title fix: Recompute Content-Digest when signing content-digest component fix: Recompute Content-Digest header value when signing content-digest component May 15, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.52%. Comparing base (0ae7976) to head (ea69904).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   94.53%   94.52%   -0.01%     
==========================================
  Files          18       18              
  Lines        1317     1315       -2     
==========================================
- Hits         1245     1243       -2     
  Misses         37       37              
  Partials       35       35              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dadrus dadrus merged commit ebd49e0 into main May 15, 2026
9 checks passed
@dadrus dadrus deleted the fix/always_recompute_content_digest branch May 15, 2026 10:17
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.

1 participant