From 447bc723e378d7ab53d5c9159bc633922413a4e8 Mon Sep 17 00:00:00 2001 From: Arnaud Mimart <33665250+amimart@users.noreply.github.com> Date: Tue, 27 Feb 2024 12:06:43 +0100 Subject: [PATCH] fix(cognitarium): prevent predicate blank node filter --- contracts/okp4-cognitarium/src/querier/engine.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contracts/okp4-cognitarium/src/querier/engine.rs b/contracts/okp4-cognitarium/src/querier/engine.rs index 06a97dbb..5a9e4c24 100644 --- a/contracts/okp4-cognitarium/src/querier/engine.rs +++ b/contracts/okp4-cognitarium/src/querier/engine.rs @@ -355,11 +355,15 @@ impl<'a> TriplePatternIterator<'a> { )> { let (s_filter, sb_filter, s_bind) = Self::resolve_pattern_part(subject, ResolvedVariable::as_subject, input)?; - let (p_filter, _, p_bind) = + let (p_filter, pb_filter, p_bind) = Self::resolve_pattern_part(predicate, ResolvedVariable::as_predicate, input)?; let (o_filter, ob_filter, o_bind) = Self::resolve_pattern_part(object, ResolvedVariable::as_object, input)?; + if pb_filter { + None?; + } + Some(( (s_filter, p_filter, o_filter), (sb_filter, ob_filter),