From 29972e190e2961d19255fd184fecd0658b8a4fc2 Mon Sep 17 00:00:00 2001 From: Jordan Santell Date: Tue, 13 Jun 2023 10:20:38 -0700 Subject: [PATCH] feat: validate link record before adoption. Fixes #257 --- rust/noosphere-sphere/src/petname/write.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/noosphere-sphere/src/petname/write.rs b/rust/noosphere-sphere/src/petname/write.rs index f18a6065c..f53ead620 100644 --- a/rust/noosphere-sphere/src/petname/write.rs +++ b/rust/noosphere-sphere/src/petname/write.rs @@ -134,7 +134,8 @@ where .await?; // TODO: Verify that a record for an existing address is actually newer than the old one - // TODO: Validate the record as a UCAN + + record.validate(self.sphere_context().await?.db()).await?; debug!( "Adopting '{}' ({}), resolving to {}...",