[Pkg-owncloud-commits] [php-sabredav] 12/29: Fixed unittests for recent security change

David Prévot taffit at moszumanska.debian.org
Fri Jul 8 00:24:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 225da90d6d11028e4979bc0be38f7b70a4c162c9
Author: Evert Pot <me at evertpot.com>
Date:   Sat May 21 01:43:55 2016 -0400

    Fixed unittests for recent security change
---
 tests/Sabre/DAVACL/PluginPropertiesTest.php | 55 +++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/tests/Sabre/DAVACL/PluginPropertiesTest.php b/tests/Sabre/DAVACL/PluginPropertiesTest.php
index 5762ac9..fb42efb 100644
--- a/tests/Sabre/DAVACL/PluginPropertiesTest.php
+++ b/tests/Sabre/DAVACL/PluginPropertiesTest.php
@@ -11,6 +11,13 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
 
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
+        //Anyone can do anything
         $plugin->principalCollectionSet = [
             'principals1',
             'principals2',
@@ -47,6 +54,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
         $plugin = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock());
         $fakeServer->addPlugin($plugin);
         $plugin = new Plugin();
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
         $fakeServer->addPlugin($plugin);
 
 
@@ -80,6 +93,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
 
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
         $server = new DAV\Server();
         $server->addPlugin($plugin);
 
@@ -140,6 +159,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
 
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
 
         $nodes = [
             new MockACLNode('foo', [
@@ -227,6 +252,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
         //$fakeServer->addPlugin($plugin);
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
         $fakeServer->addPlugin($plugin);
 
         $requestedProperties = [
@@ -256,6 +287,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
         //$fakeServer->addPlugin($plugin);
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
         $fakeServer->addPlugin($plugin);
 
         $requestedProperties = [
@@ -286,6 +323,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
         //$fakeServer->addPlugin($plugin);
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
         $fakeServer->addPlugin($plugin);
 
         $requestedProperties = [
@@ -315,6 +358,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
         $fakeServer->addPlugin($plugin);
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
 
         $requestedProperties = [
             '{DAV:}group-membership',
@@ -343,6 +392,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
         $plugin = new Plugin();
         $plugin->allowUnauthenticatedAccess = false;
         $fakeServer->addPlugin($plugin);
+        $plugin->setDefaultACL([
+            [
+                'principal' => '{DAV:}all',
+                'privilege' => '{DAV:}all',
+            ],
+        ]);
 
         $requestedProperties = [
             '{DAV:}displayname',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list