Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security bugfix #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ajax/job_info_row.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 . "')";
Expand Down Expand Up @@ -171,4 +181,4 @@
</tr>
<?php
}
?>
?>
4 changes: 2 additions & 2 deletions appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -60,4 +60,4 @@

OC_FileProxy::register(new NC_FileProxy());

?>
?>
5 changes: 5 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
// add to $CONFIG array settings regarding the security bug fix
require_once('config.php');
if ( ! in_array("custom_csp_policy", OC_Config::getKeys()) ) {
OC_Config::setValue('custom_csp_policy', 'default-src \'self\'; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; style-src \'self\' \'unsafe-inline\'; frame-src *; img-src *; font-src \'self\' data:; media-src *');
}

require_once('base.php');

Expand Down