diff options
author | crowlKats <13135287+crowlKats@users.noreply.github.com> | 2021-04-12 04:15:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 11:15:43 +0900 |
commit | fefe93c91b63e35bf88f5f432f0cca09948d0623 (patch) | |
tree | bf8f3e031cf558161277e01e4ca2e2c7817ef6ab /runtime/ops/tls.rs | |
parent | 8b49d948f58e0665e87e63f7e154ab53fa60a939 (diff) |
feat(runtime/permissions): prompt fallback (#9376)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/ops/tls.rs')
-rw-r--r-- | runtime/ops/tls.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/ops/tls.rs b/runtime/ops/tls.rs index 83dbbfcd1..36762d66c 100644 --- a/runtime/ops/tls.rs +++ b/runtime/ops/tls.rs @@ -107,8 +107,8 @@ async fn op_start_tls( } { super::check_unstable2(&state, "Deno.startTls"); - let s = state.borrow(); - let permissions = s.borrow::<Permissions>(); + let mut s = state.borrow_mut(); + let permissions = s.borrow_mut::<Permissions>(); permissions.net.check(&(&domain, Some(0)))?; if let Some(path) = &args.cert_file { permissions.read.check(Path::new(&path))?; @@ -170,8 +170,8 @@ async fn op_connect_tls( assert_eq!(args.transport, "tcp"); { - let s = state.borrow(); - let permissions = s.borrow::<Permissions>(); + let mut s = state.borrow_mut(); + let permissions = s.borrow_mut::<Permissions>(); permissions.net.check(&(&args.hostname, Some(args.port)))?; if let Some(path) = &args.cert_file { permissions.read.check(Path::new(&path))?; @@ -313,7 +313,7 @@ fn op_listen_tls( let cert_file = args.cert_file; let key_file = args.key_file; { - let permissions = state.borrow::<Permissions>(); + let permissions = state.borrow_mut::<Permissions>(); permissions.net.check(&(&args.hostname, Some(args.port)))?; permissions.read.check(Path::new(&cert_file))?; permissions.read.check(Path::new(&key_file))?; |