Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(attachments): correct attachment authorization check

Steven Enamakel9c3cf8a94252
diff --git a/crates/openhuman-core/src/threads/attachments/staged.rs b/crates/openhuman-core/src/threads/attachments/staged.rs
index b23bfc9256..09ed0b116f 100644
--- a/crates/openhuman-core/src/threads/attachments/staged.rs
+++ b/crates/openhuman-core/src/threads/attachments/staged.rs
@@ -538,7 +538,7 @@ pub(crate) async fn read_authorized_native_attachment(
&& claim.thread_id == thread_id
&& claim.part == record.attachment.part
});
- if !current_authority && !(allow_committed_history && committed_authority) {
+ if !(current_authority || allow_committed_history && committed_authority) {
return Err("native attachment lacks a current or committed host grant".into());
}
validate_native_attachment_policy(&record.attachment, config)?;