lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit 82a47e7f750e064b23e126514895609f6108cdde
parent 689ffa81ef03e4d2e049645807b276f802fcf6eb
Author: triesap <tyson@radroots.org>
Date:   Fri, 16 Oct 2026 02:00:22 +0000

storage: Avoid deprecated digest conversion in draft validation

- Compare the fixed digest through its slice indexing implementation.
- Preserve payload bounds, validation order and every existing assertion.
- Pass all 42 storage tests and both feature configurations on Rust 1.99.0.
- Clear the diagnostic across eight fuzz targets without dependency changes.

Diffstat:
Mcrates/storage/src/authored_draft.rs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crates/storage/src/authored_draft.rs b/crates/storage/src/authored_draft.rs @@ -320,7 +320,7 @@ impl AuthoredDraft { || schema.chars().any(char::is_control) || self.payload.is_empty() || self.payload.len() > AUTHORED_DRAFT_PAYLOAD_MAX_BYTES - || Sha256::digest(self.payload.as_slice()).as_slice() != self.payload_sha256 + || Sha256::digest(self.payload.as_slice())[..] != self.payload_sha256 || self.created_at_unix_ms == 0 || self.updated_at_unix_ms < self.created_at_unix_ms || (requires_operation && self.operation_id.is_none())