From 41446f07d829c997f7edbd70fd7e430753867139 Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Sun, 1 Sep 2024 21:31:47 +0200 Subject: [PATCH] core: Add SandboxType::Application for AIR apps --- core/src/avm1/globals/system_security.rs | 2 +- core/src/avm2/globals/flash/system/security.rs | 1 + core/src/sandbox.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/avm1/globals/system_security.rs b/core/src/avm1/globals/system_security.rs index b5bfb12fd..b74de6dd0 100644 --- a/core/src/avm1/globals/system_security.rs +++ b/core/src/avm1/globals/system_security.rs @@ -65,7 +65,7 @@ fn get_sandbox_type<'gc>( SandboxType::Remote => "remote", SandboxType::LocalWithFile => "localWithFile", SandboxType::LocalWithNetwork => "localWithNetwork", - SandboxType::LocalTrusted => "localTrusted", + SandboxType::LocalTrusted | SandboxType::Application => "localTrusted", }, ) .into()) diff --git a/core/src/avm2/globals/flash/system/security.rs b/core/src/avm2/globals/flash/system/security.rs index f9b16c25e..10dc3df26 100644 --- a/core/src/avm2/globals/flash/system/security.rs +++ b/core/src/avm2/globals/flash/system/security.rs @@ -44,6 +44,7 @@ pub fn get_sandbox_type<'gc>( SandboxType::LocalWithFile => "localWithFile", SandboxType::LocalWithNetwork => "localWithNetwork", SandboxType::LocalTrusted => "localTrusted", + SandboxType::Application => "application", }; return Ok(AvmString::new_utf8(activation.context.gc_context, sandbox_type).into()); } diff --git a/core/src/sandbox.rs b/core/src/sandbox.rs index e4dbeed77..7d9bcd954 100644 --- a/core/src/sandbox.rs +++ b/core/src/sandbox.rs @@ -24,4 +24,7 @@ pub enum SandboxType { /// The movie is a trusted local movie with access to both filesystem and network. LocalTrusted, + + /// The movie is an AIR application with access to both filesystem and network. + Application, }