Merge pull request #13505 from owncloud/streamline-scanning-code
Streamline auth and CSRF check in scan.php
This commit is contained in:
commit
df58eea93f
|
@ -1,11 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
set_time_limit(0); //scanning can take ages
|
set_time_limit(0); //scanning can take ages
|
||||||
|
|
||||||
|
\OCP\JSON::checkLoggedIn();
|
||||||
|
\OCP\JSON::callCheck();
|
||||||
|
|
||||||
\OC::$server->getSession()->close();
|
\OC::$server->getSession()->close();
|
||||||
|
|
||||||
$force = (isset($_GET['force']) and ($_GET['force'] === 'true'));
|
$force = (isset($_GET['force']) and ($_GET['force'] === 'true'));
|
||||||
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
|
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
|
||||||
if (isset($_GET['users'])) {
|
if (isset($_GET['users'])) {
|
||||||
OC_JSON::checkAdminUser();
|
\OCP\JSON::checkAdminUser();
|
||||||
if ($_GET['users'] === 'all') {
|
if ($_GET['users'] === 'all') {
|
||||||
$users = OC_User::getUsers();
|
$users = OC_User::getUsers();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue