diff --git a/core/ajax/share.php b/core/ajax/share.php
index b615cfd3541bf77c5363030cf33309ec7817e725..446d4cc32ec8bd1999e28d940fb8fc39b3602775 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -21,6 +21,8 @@
 require_once '../../lib/base.php';
 
 OC_JSON::checkLoggedIn();
+OCP\JSON::callCheck();
+
 if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSource'])) {
 	switch ($_POST['action']) {
 		case 'share':