CSRF checks

This commit is contained in:
Lukas Reschke 2012-07-07 15:58:11 +02:00
parent c63db28eaf
commit 0abcf0a421
6 changed files with 6 additions and 0 deletions

View file

@ -4,6 +4,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_GET["dir"]);

View file

@ -4,6 +4,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_GET["dir"]);

View file

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

View file

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

View file

@ -4,6 +4,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_GET["dir"]);

View file

@ -7,6 +7,7 @@
OCP\JSON::setContentTypeHeader('text/plain');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
if (!isset($_FILES['files'])) {
OCP\JSON::error(array("data" => array( "message" => "No file was uploaded. Unknown error" )));