From 1748bfae57f2a5ff0ebe8fa8d3f73b726c0f821a Mon Sep 17 00:00:00 2001 From: David Parks Date: Sat, 24 Sep 2016 02:54:12 -0700 Subject: [PATCH] Bug 1269114 - [x86_64] Last picked directory not saved when using Flash Player uploader. r=jimm Adds a couple of registry paths to the broker's ALLOW policy. --- .../win/src/sandboxbroker/sandboxBroker.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp index f9c1e45a5644..58c205076a44 100644 --- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp +++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp @@ -311,6 +311,20 @@ SandboxBroker::SetSecurityLevelForPluginProcess(int32_t aSandboxLevel) SANDBOX_ENSURE_SUCCESS(result, "With these static arguments AddRule should never fail, what happened?"); + // These register keys are used by the file-browser dialog box. They + // remember the most-recently-used folders. + result = mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_REGISTRY, + sandbox::TargetPolicy::REG_ALLOW_ANY, + L"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ComDlg32\\OpenSavePidlMRU\\*"); + SANDBOX_ENSURE_SUCCESS(result, + "With these static arguments AddRule should never fail, what happened?"); + + result = mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_REGISTRY, + sandbox::TargetPolicy::REG_ALLOW_ANY, + L"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ComDlg32\\LastVisitedPidlMRULegacy\\*"); + SANDBOX_ENSURE_SUCCESS(result, + "With these static arguments AddRule should never fail, what happened?"); + return true; }