Added CSRF checks to files_versions. Expect some error messages - and report them ;)

This commit is contained in:
Thomas Tanghus 2012-07-17 11:57:38 +02:00
parent 8444fc5787
commit 748fcabba4
3 changed files with 3 additions and 0 deletions

View file

@ -27,6 +27,7 @@
// Check user and app status // Check user and app status
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();
OCP\App::checkAppEnabled('files_versions'); OCP\App::checkAppEnabled('files_versions');
OCP\JSON::callCheck();
$versions = new OCA_Versions\Storage(); $versions = new OCA_Versions\Storage();

View file

@ -1,6 +1,7 @@
<?php <?php
OCP\JSON::checkAppEnabled('files_versions'); OCP\JSON::checkAppEnabled('files_versions');
OCP\JSON::callCheck();
$userDirectory = "/".OCP\USER::getUser()."/files"; $userDirectory = "/".OCP\USER::getUser()."/files";

View file

@ -2,6 +2,7 @@
OCP\JSON::checkAppEnabled('files_versions'); OCP\JSON::checkAppEnabled('files_versions');
OCP\JSON::checkAdminUser(); OCP\JSON::checkAdminUser();
OCP\JSON::callCheck();
if (OCP\Config::getSystemValue('versions', 'true')=='true') { if (OCP\Config::getSystemValue('versions', 'true')=='true') {
OCP\Config::setSystemValue('versions', 'false'); OCP\Config::setSystemValue('versions', 'false');
} else { } else {