summaryrefslogtreecommitdiffstats
path: root/lib/public/json.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-13 17:33:19 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-13 17:33:19 +0200
commit89464721c7aa4464419cbcbedc658843f6c4696d (patch)
treea832cf7faa050440aaeb66c3df831d15d0da751a /lib/public/json.php
parent9e9c40eabd07cc4b44f2a9ae3d7935ad2a07b9fa (diff)
downloadnextcloud-server-89464721c7aa4464419cbcbedc658843f6c4696d.tar.gz
nextcloud-server-89464721c7aa4464419cbcbedc658843f6c4696d.zip
Added JSON methods for CSRF prevention. Make request token accessible from template and add js var.
Diffstat (limited to 'lib/public/json.php')
-rw-r--r--lib/public/json.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/public/json.php b/lib/public/json.php
index a8554671d10..b6edbd65bd5 100644
--- a/lib/public/json.php
+++ b/lib/public/json.php
@@ -53,6 +53,13 @@ class JSON {
return(\OC_JSON::checkLoggedIn());
}
+ /**
+ * @brief Check an ajax get/post call if the request token is valid.
+ * @return json Error msg if not valid.
+ */
+ public static function callCheck(){
+ return(\OC_JSON::callCheck());
+ }
/**
* @brief Send json success msg