diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-09-30 15:50:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 15:50:59 -0400 |
commit | c3e441c5b54de09ca3af3e1fd0098e8d307c18d7 (patch) | |
tree | df7a71df21e94df22af9615829f2003f904d2e69 /runtime/ops/worker_host.rs | |
parent | cdac1905831df1b2f6fbf863bfd6d884dbe2c0e3 (diff) |
fix: worker environment permissions should accept an array (#12250)
Diffstat (limited to 'runtime/ops/worker_host.rs')
-rw-r--r-- | runtime/ops/worker_host.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index f749e495c..c1ce782da 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -223,7 +223,10 @@ fn merge_env_permission( ) -> Result<UnaryPermission<EnvDescriptor>, AnyError> { if let Some(worker) = worker { if (worker.global_state < main.global_state) - || !worker.granted_list.iter().all(|x| main.check(&x.0).is_ok()) + || !worker + .granted_list + .iter() + .all(|x| main.check(x.as_ref()).is_ok()) { return Err(custom_error( "PermissionDenied", @@ -448,11 +451,7 @@ where Ok(Some(UnaryPermission::<EnvDescriptor> { global_state: value.global_state, - granted_list: value - .paths - .into_iter() - .map(|env| EnvDescriptor(env.to_uppercase())) - .collect(), + granted_list: value.paths.into_iter().map(EnvDescriptor::new).collect(), ..Default::default() })) } |