]> source.dussan.org Git - nextcloud-server.git/commitdiff
shareType and permissions are integers
authorBjoern Schiessle <schiessle@owncloud.com>
Wed, 7 Jan 2015 15:34:51 +0000 (16:34 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Wed, 7 Jan 2015 15:36:13 +0000 (16:36 +0100)
core/ajax/share.php

index 2831d42a3670665493edb0d6f9327d7f54ca4423..1a2faa75dace4b7f2b0d1deeb912fb50107db794 100644 (file)
@@ -73,9 +73,9 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
                                $return = OCP\Share::setPermissions(
                                        $_POST['itemType'],
                                        $_POST['itemSource'],
-                                       $_POST['shareType'],
+                                       (int)$_POST['shareType'],
                                        $_POST['shareWith'],
-                                       $_POST['permissions']
+                                       (int)$_POST['permissions']
                                );
                                ($return) ? OC_JSON::success() : OC_JSON::error();
                        }