Added CSRF checks to files_versions. Expect some error messages - and report them ;)
This commit is contained in:
parent
8444fc5787
commit
748fcabba4
3 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue