close the session on all file operations

This commit is contained in:
Thomas Müller 2014-03-10 14:39:27 +01:00
parent 73a1ece753
commit 58c216d0e8
14 changed files with 16 additions and 10 deletions

View File

@ -1,10 +1,9 @@
<?php
// Init owncloud
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
\OC::$session->close();
// Get data
$dir = stripslashes($_POST["dir"]);

View File

@ -29,6 +29,7 @@ $RUNTIME_APPTYPES=array('filesystem');
// Check if we are a user
OCP\User::checkLoggedIn();
\OC::$session->close();
$files = $_GET["files"];
$dir = $_GET["dir"];

View File

@ -10,6 +10,7 @@ if (isset($_GET['dir'])) {
}
OCP\JSON::checkLoggedIn();
\OC::$session->close();
// send back json
OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir)));

View File

@ -7,6 +7,7 @@ $RUNTIME_APPTYPES=array('filesystem');
OCP\JSON::checkLoggedIn();
\OC::$session->close();
// Load the files
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';

View File

@ -1,3 +1,4 @@
<?php
\OC::$session->close();
print OC_Helper::mimetypeIcon($_GET['mime']);

View File

@ -1,10 +1,8 @@
<?php
// Init owncloud
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
\OC::$session->close();
// Get data
$dir = stripslashes($_POST["dir"]);

View File

@ -7,7 +7,8 @@ if(!OC_User::isLoggedIn()) {
exit;
}
session_write_close();
\OC::$session->close();
// Get the params
$dir = isset( $_REQUEST['dir'] ) ? '/'.trim($_REQUEST['dir'], '/\\') : '';
$filename = isset( $_REQUEST['filename'] ) ? trim($_REQUEST['filename'], '/\\') : '';

View File

@ -5,6 +5,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
\OC::$session->close();
// Get the params
$dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : '';

View File

@ -4,6 +4,7 @@
$RUNTIME_APPTYPES = array('filesystem');
OCP\JSON::checkLoggedIn();
\OC::$session->close();
// Load the files
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';

View File

@ -23,6 +23,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
\OC::$session->close();
$files = new \OCA\Files\App(
\OC\Files\Filesystem::getView(),

View File

@ -1,6 +1,6 @@
<?php
set_time_limit(0); //scanning can take ages
session_write_close();
\OC::$session->close();
$force = (isset($_GET['force']) and ($_GET['force'] === 'true'));
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';

View File

@ -1,6 +1,6 @@
<?php
set_time_limit(0); //scanning can take ages
session_write_close();
\OC::$session->close();
$user = OC_User::getUser();
$eventSource = new OC_EventSource();

View File

@ -58,6 +58,7 @@ if (empty($_POST['dirToken'])) {
OCP\JSON::callCheck();
\OC::$session->close();
// get array with current storage stats (e.g. max file size)

View File

@ -48,7 +48,7 @@ try {
require_once 'lib/base.php';
session_write_close();
\OC::$session->close();
$logger = \OC_Log::$object;