From 0db2fe6e39cca8eda1d2f53b3715a67e1bce4c5c Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 24 Jan 2016 13:53:18 -0800 Subject: remote delegation issue when already logged in with different account on same site. --- boot.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 9d80eedb4..d6c02ecc0 100755 --- a/boot.php +++ b/boot.php @@ -1553,6 +1553,10 @@ function goaway($s) { * @return int|bool account_id or false */ function get_account_id() { + + if(intval($_SESSION['account_id'])) + return intval($_SESSION['account_id']); + if(get_app()->account) return intval(get_app()->account['account_id']); -- cgit v1.2.3 From baed7d339ee0d5139fe1c93691a4225796e7e08c Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 24 Jan 2016 15:20:25 -0800 Subject: make exec the default for proc_run - use system.use_proc_open to use proc_open. Also prohibit delegated channels from manually invoking new_channel under the delegated account. --- boot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index d6c02ecc0..b80b76a8a 100755 --- a/boot.php +++ b/boot.php @@ -1728,10 +1728,10 @@ function proc_run($cmd){ proc_close(proc_open($cmd, array(), $foo)); } else { - if(get_config('system','proc_run_use_exec')) - exec($cmdline . ' > /dev/null &'); - else + if(get_config('system','use_proc_open')) proc_close(proc_open($cmdline ." &", array(), $foo)); + else + exec($cmdline . ' > /dev/null &'); } } -- cgit v1.2.3