From 344299a074e135140262d051531f723be69c786f Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sat, 9 Jun 2012 15:05:14 +0200 Subject: add two csrf check calls. Review and lot´s of porting needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/public/util.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/public/util.php') diff --git a/lib/public/util.php b/lib/public/util.php index 9b499574da1..995161e2abe 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -248,6 +248,26 @@ class Util { } + /** + * Register an get/post call. This is important to prevent CSRF attacks + * TODO: write example + */ + public static function callRegister(){ + return(\OC_Util::callRegister()); + } + + + /** + * Check an ajax get/post call if the request token is valid. exit if not. + * Todo: Write howto + */ + public static function callCheck(){ + return(\OC_Util::callCheck()); + } + + + + } ?> -- cgit v1.2.3