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

remotes/origin/stable5
Thomas Tanghus 14 years ago
parent 1f4d6896df
commit 06ff6c6d7d
  1. 2
      apps/calendar/ajax/calendar/activation.php
  2. 1
      apps/calendar/ajax/calendar/delete.php
  3. 3
      apps/calendar/ajax/calendar/new.php
  4. 1
      apps/calendar/ajax/calendar/update.php
  5. 1
      apps/calendar/ajax/categories/rescan.php
  6. 1
      apps/calendar/ajax/event/delete.php
  7. 1
      apps/calendar/ajax/event/edit.php
  8. 1
      apps/calendar/ajax/event/move.php
  9. 1
      apps/calendar/ajax/event/new.php
  10. 1
      apps/calendar/ajax/event/resize.php
  11. 1
      apps/calendar/ajax/import/import.php
  12. 1
      apps/calendar/ajax/settings/setfirstday.php
  13. 1
      apps/calendar/ajax/settings/settimeformat.php
  14. 1
      apps/calendar/ajax/settings/settimezone.php

@ -9,6 +9,8 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$calendarid = $_POST['calendarid'];
$calendar = OC_Calendar_App::getCalendar($calendarid, true);
if(!$calendar){

@ -9,6 +9,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$cal = $_POST["calendarid"];
$calendar = OC_Calendar_App::getCalendar($cal, true);

@ -6,11 +6,10 @@
* See the COPYING-README file.
*/
// Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
if(trim($_POST['name']) == ''){
OCP\JSON::error(array('message'=>'empty'));

@ -11,6 +11,7 @@
// Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
if(trim($_POST['name']) == ''){
OCP\JSON::error(array('message'=>'empty'));

@ -9,6 +9,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
foreach ($_POST as $key=>$element) {
debug('_POST: '.$key.'=>'.print_r($element, true));

@ -9,6 +9,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$id = $_POST['id'];
$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);

@ -9,6 +9,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$id = $_POST['id'];

@ -7,6 +7,7 @@
*/
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$id = $_POST['id'];
$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);

@ -10,6 +10,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$errarr = OC_Calendar_Object::validateRequest($_POST);
if($errarr){

@ -7,6 +7,7 @@
*/
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$id = $_POST['id'];

@ -10,6 +10,7 @@ ob_start();
OCP\JSON::checkLoggedIn();
OCP\App::checkAppEnabled('calendar');
OCP\JSON::callCheck();
session_write_close();
$nl="\r\n";

@ -7,6 +7,7 @@
*/
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
if(isset($_POST["firstday"])){
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'firstday', $_POST["firstday"]);
OCP\JSON::success();

@ -7,6 +7,7 @@
*/
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
if(isset($_POST["timeformat"])){
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timeformat', $_POST["timeformat"]);
OCP\JSON::success();

@ -14,6 +14,7 @@ $l=OC_L10N::get('calendar');
// Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
// Get data
if( isset( $_POST['timezone'] ) ){

Loading…
Cancel
Save