aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-12-18 15:43:13 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-22 09:32:14 +0100
commit6f00729124053a8348f95a53d318317eb6d583fc (patch)
tree46650e0d86f9ab921cccc324fbc1df5b017c1318 /lib/private/util.php
parent152e72c4fcf7d4003924818fae9b1c2f86d6cd2a (diff)
downloadnextcloud-server-6f00729124053a8348f95a53d318317eb6d583fc.tar.gz
nextcloud-server-6f00729124053a8348f95a53d318317eb6d583fc.zip
Refactor OC_Util::callCheck
Diffstat (limited to 'lib/private/util.php')
-rw-r--r--lib/private/util.php22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 12146f6980b..c9738b29ca1 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1127,7 +1127,6 @@ class OC_Util {
* Creates a 'request token' (random) and stores it inside the session.
* Ever subsequent (ajax) request must use such a valid token to succeed,
* otherwise the request will be denied as a protection against CSRF.
- * @see OC_Util::isCallRegistered()
*/
public static function callRegister() {
// Use existing token if function has already been called
@@ -1155,27 +1154,6 @@ class OC_Util {
}
/**
- * Check an ajax get/post call if the request token is valid.
- *
- * @return boolean False if request token is not set or is invalid.
- * @see OC_Util::callRegister()
- */
- public static function isCallRegistered() {
- return \OC::$server->getRequest()->passesCSRFCheck();
- }
-
- /**
- * Check an ajax get/post call if the request token is valid. Exit if not.
- *
- * @return void
- */
- public static function callCheck() {
- if (!OC_Util::isCallRegistered()) {
- exit();
- }
- }
-
- /**
* Public function to sanitize HTML
*
* This function is used to sanitize HTML and should be applied on any