From c7c0249d34053b3b0cdb0dc1ad69d28c8d191e77 Mon Sep 17 00:00:00 2001 From: Micha de Vries Date: Mon, 19 Aug 2024 13:09:35 +0200 Subject: [PATCH] Allow isolated context to read protected params (#4533) --- core/src/ctx/context.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/ctx/context.rs b/core/src/ctx/context.rs index a45b3551..f2720cb0 100644 --- a/core/src/ctx/context.rs +++ b/core/src/ctx/context.rs @@ -1,3 +1,4 @@ +use crate::cnf::PROTECTED_PARAM_NAMES; use crate::ctx::canceller::Canceller; use crate::ctx::reason::Reason; #[cfg(feature = "http")] @@ -371,7 +372,7 @@ impl MutableContext { pub fn value(&self, key: &str) -> Option<&Value> { match self.values.get(key) { Some(v) => Some(v.as_ref()), - None if !self.isolated => match &self.parent { + None if PROTECTED_PARAM_NAMES.contains(&key) || !self.isolated => match &self.parent { Some(p) => p.value(key), _ => None, },