diff --git a/lib/Controller/Aria2Controller.php b/lib/Controller/Aria2Controller.php index 49ed3d3..2a092a6 100644 --- a/lib/Controller/Aria2Controller.php +++ b/lib/Controller/Aria2Controller.php @@ -38,7 +38,10 @@ class Aria2Controller extends Controller $this->aria2->init(); $this->dbconn = new DBConn(); } - + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function Action($path) { $path = strtolower(trim($path)); @@ -97,6 +100,10 @@ class Aria2Controller extends Controller $data = $this->aria2->start(); return $data; } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function Update() { $resp = folderScan::create()->scan(); @@ -110,6 +117,10 @@ class Aria2Controller extends Controller 'path' => $this->urlGenerator->linkToRoute('ncdownloader.Aria2.Action', ['path' => $path]), ); } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function getStatus($path) { //$path = $this->request->getRequestUri(); diff --git a/lib/Controller/MainController.php b/lib/Controller/MainController.php index f917bd9..e7e0600 100644 --- a/lib/Controller/MainController.php +++ b/lib/Controller/MainController.php @@ -54,7 +54,10 @@ class MainController extends Controller return $response; } - + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function Download() { $url = trim($this->request->getParam('form_input_text')); diff --git a/lib/Controller/SearchController.php b/lib/Controller/SearchController.php index 5e55fe8..afe94d3 100644 --- a/lib/Controller/SearchController.php +++ b/lib/Controller/SearchController.php @@ -21,7 +21,10 @@ class SearchController extends Controller $this->urlGenerator = \OC::$server->getURLGenerator(); $this->search = new torrentSearch(); } - + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function execute() { $keyword = trim($this->request->getParam('form_input_text')); diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index ff01cb3..e80907c 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -40,6 +40,10 @@ class SettingsController extends Controller $this->save($key, $value); } } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function aria2Get() { $data = json_decode($this->settings->get("custom_aria2_settings")); @@ -58,12 +62,20 @@ class SettingsController extends Controller } } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function aria2Save() { $params = $this->request->getParams(); $data = Helper::filterData($params, Helper::aria2Options()); $this->settings->save("custom_aria2_settings", json_encode($data)); } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function aria2Delete() { $saved = json_decode($this->settings->get("custom_aria2_settings"),1); diff --git a/lib/Controller/YoutubeController.php b/lib/Controller/YoutubeController.php index c3ff4ba..b6a0ddf 100644 --- a/lib/Controller/YoutubeController.php +++ b/lib/Controller/YoutubeController.php @@ -69,6 +69,10 @@ class YoutubeController extends Controller $resp['counter'] = ['youtube-dl' => count($data)]; return new JSONResponse($resp); } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function Download() { $params = array(); @@ -96,7 +100,10 @@ class YoutubeController extends Controller return ['error' => $this->l10n->t("failed to get any url!")]; } } - + /** + * @NoAdminRequired + * @NoCSRFRequired + */ public function Delete() { $gid = $this->request->getParam('gid'); diff --git a/templates/settings/Admin.php b/templates/settings/Admin.php index dee6921..3503517 100644 --- a/templates/settings/Admin.php +++ b/templates/settings/Admin.php @@ -4,7 +4,7 @@ extract($_); ?>