From 35192390ba232af0db342249d69ff0e5e6f7cba6 Mon Sep 17 00:00:00 2001 From: kirk86 Date: Sat, 31 Oct 2015 15:10:26 +0000 Subject: [PATCH 1/4] security bugfix added to neurobox plugin to automatically write config.php --- appinfo/app.php | 4 ++-- index.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index 2304e18..2841a8c 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -13,7 +13,7 @@ 'order' => 74, 'href' => OC_Helper::linkTo('neurocloud', 'index.php'), 'icon' => OC_Helper::imagePath('neurocloud', 'neurocloud.png'), - 'name' => 'Neurocloud')); + 'name' => 'Neurobox')); /** * register the classpath @@ -60,4 +60,4 @@ OC_FileProxy::register(new NC_FileProxy()); -?> \ No newline at end of file +?> diff --git a/index.php b/index.php index 0e789db..a07a078 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,9 @@ Date: Sun, 1 Nov 2015 15:15:03 +0000 Subject: [PATCH 2/4] added sync of home/remote directories when creating directory via owncloud interface --- ajax/job_info_row.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ajax/job_info_row.php b/ajax/job_info_row.php index 9a834bf..dcd2d8a 100644 --- a/ajax/job_info_row.php +++ b/ajax/job_info_row.php @@ -76,6 +76,16 @@ $sgerunning = $queueinfo[1]; } +// check the transition of a job from RUNNING to FINISHED in order to create and destroy directory +// to make owncloud sync its file index. +if ($precstatus === JobStatus::$RUNNING && $status === JobStatus::$FINISHED) +{ + $newdir = OC_User::getHome(OC_User::getUser()).DIRECTORY_SEPARATOR."files".DIRECTORY_SEPARATOR.$job."_dummydir"; + mkdir($newdir); + sleep(3); + rmdir($newdir); +} + $showoutputjs = "javascript:show_output('" . $outputid . "', '" . $output_file . "')"; $killjs = OC_Helper::linkTo("neurocloud", "ajax/kill_job.php", array("study" => $file, "jobid" => $job, "redirect" => 1)); $refreshstatusjs = "javascript:refresh_job_status('" . $rowid . "','" . $file . "','" . $job . "','" . $outputid . "')"; @@ -171,4 +181,4 @@ \ No newline at end of file +?> From 9f813b59336c809645b511703cba5adab1714b8b Mon Sep 17 00:00:00 2001 From: kirk Date: Sun, 1 Nov 2015 15:32:48 +0000 Subject: [PATCH 3/4] undo previous changes regarding security fix and sync --- ajax/job_info_row.php | 14 +++++++------- index.php | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ajax/job_info_row.php b/ajax/job_info_row.php index dcd2d8a..eb2a344 100644 --- a/ajax/job_info_row.php +++ b/ajax/job_info_row.php @@ -78,13 +78,13 @@ // check the transition of a job from RUNNING to FINISHED in order to create and destroy directory // to make owncloud sync its file index. -if ($precstatus === JobStatus::$RUNNING && $status === JobStatus::$FINISHED) -{ - $newdir = OC_User::getHome(OC_User::getUser()).DIRECTORY_SEPARATOR."files".DIRECTORY_SEPARATOR.$job."_dummydir"; - mkdir($newdir); - sleep(3); - rmdir($newdir); -} +//if ($precstatus === JobStatus::$RUNNING && $status === JobStatus::$FINISHED) +//{ +// $newdir = OC_User::getHome(OC_User::getUser()).DIRECTORY_SEPARATOR."files".DIRECTORY_SEPARATOR.$job."_dummydir"; +// mkdir($newdir); +// sleep(3); +// rmdir($newdir); +//} $showoutputjs = "javascript:show_output('" . $outputid . "', '" . $output_file . "')"; $killjs = OC_Helper::linkTo("neurocloud", "ajax/kill_job.php", array("study" => $file, "jobid" => $job, "redirect" => 1)); diff --git a/index.php b/index.php index a07a078..d407d4e 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,9 @@ Date: Sun, 1 Nov 2015 15:38:49 +0000 Subject: [PATCH 4/4] security bugfix added to automatically modify the config.php file --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index d407d4e..a07a078 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,9 @@