From 080d123e0e673d7cf4210ef1be77a84e53f32b89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 07:54:44 +0000 Subject: [PATCH 1/3] chore(deps-dev): Bump behat/behat in /tests/Integration Bumps [behat/behat](https://github.com/Behat/Behat) from 3.14.0 to 3.15.0. - [Release notes](https://github.com/Behat/Behat/releases) - [Changelog](https://github.com/Behat/Behat/blob/master/CHANGELOG.md) - [Commits](https://github.com/Behat/Behat/compare/v3.14.0...v3.15.0) --- updated-dependencies: - dependency-name: behat/behat dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- tests/Integration/composer.lock | 141 ++++++++++++++++---------------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/tests/Integration/composer.lock b/tests/Integration/composer.lock index 3f27c05..41b6624 100644 --- a/tests/Integration/composer.lock +++ b/tests/Integration/composer.lock @@ -9,20 +9,20 @@ "packages-dev": [ { "name": "behat/behat", - "version": "v3.14.0", + "version": "v3.15.0", "source": { "type": "git", "url": "https://github.com/Behat/Behat.git", - "reference": "2a3832d9cb853a794af3a576f9e524ae460f3340" + "reference": "132e32fdad69340f503b103a5ccaf5dd72ce7d83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Behat/zipball/2a3832d9cb853a794af3a576f9e524ae460f3340", - "reference": "2a3832d9cb853a794af3a576f9e524ae460f3340", + "url": "https://api.github.com/repos/Behat/Behat/zipball/132e32fdad69340f503b103a5ccaf5dd72ce7d83", + "reference": "132e32fdad69340f503b103a5ccaf5dd72ce7d83", "shasum": "" }, "require": { - "behat/gherkin": "^4.9.0", + "behat/gherkin": "^4.10.0", "behat/transliterator": "^1.2", "ext-mbstring": "*", "php": "^7.2 || ^8.0", @@ -36,7 +36,6 @@ }, "require-dev": { "herrera-io/box": "~1.6.1", - "phpspec/prophecy": "^1.15", "phpunit/phpunit": "^8.5 || ^9.0", "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0", "vimeo/psalm": "^4.8" @@ -73,7 +72,7 @@ } ], "description": "Scenario-oriented BDD framework for PHP", - "homepage": "http://behat.org/", + "homepage": "https://behat.org/", "keywords": [ "Agile", "BDD", @@ -90,31 +89,31 @@ ], "support": { "issues": "https://github.com/Behat/Behat/issues", - "source": "https://github.com/Behat/Behat/tree/v3.14.0" + "source": "https://github.com/Behat/Behat/tree/v3.15.0" }, - "time": "2023-12-09T13:55:02+00:00" + "time": "2024-10-30T07:54:51+00:00" }, { "name": "behat/gherkin", - "version": "v4.9.0", + "version": "v4.10.0", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4" + "reference": "cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4", - "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6", + "reference": "cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6", "shasum": "" }, "require": { "php": "~7.2|~8.0" }, "require-dev": { - "cucumber/cucumber": "dev-gherkin-22.0.0", + "cucumber/cucumber": "dev-gherkin-24.1.0", "phpunit/phpunit": "~8|~9", - "symfony/yaml": "~3|~4|~5" + "symfony/yaml": "~3|~4|~5|~6|~7" }, "suggest": { "symfony/yaml": "If you want to parse features, represented in YAML files" @@ -153,9 +152,9 @@ ], "support": { "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.9.0" + "source": "https://github.com/Behat/Gherkin/tree/v4.10.0" }, - "time": "2021-10-12T13:05:09+00:00" + "time": "2024-10-19T14:46:06+00:00" }, { "name": "behat/transliterator", @@ -3026,16 +3025,16 @@ }, { "name": "symfony/config", - "version": "v6.4.8", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "12e7e52515ce37191b193cf3365903c4f3951e35" + "reference": "5ed4195a81d2352e0e4ce24e5f7e26fc794e7597" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/12e7e52515ce37191b193cf3365903c4f3951e35", - "reference": "12e7e52515ce37191b193cf3365903c4f3951e35", + "url": "https://api.github.com/repos/symfony/config/zipball/5ed4195a81d2352e0e4ce24e5f7e26fc794e7597", + "reference": "5ed4195a81d2352e0e4ce24e5f7e26fc794e7597", "shasum": "" }, "require": { @@ -3081,7 +3080,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.4.8" + "source": "https://github.com/symfony/config/tree/v6.4.13" }, "funding": [ { @@ -3097,20 +3096,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-10-25T15:07:50+00:00" }, { "name": "symfony/console", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" + "reference": "f793dd5a7d9ae9923e35d0503d08ba734cec1d79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", + "url": "https://api.github.com/repos/symfony/console/zipball/f793dd5a7d9ae9923e35d0503d08ba734cec1d79", + "reference": "f793dd5a7d9ae9923e35d0503d08ba734cec1d79", "shasum": "" }, "require": { @@ -3175,7 +3174,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.12" + "source": "https://github.com/symfony/console/tree/v6.4.13" }, "funding": [ { @@ -3191,20 +3190,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:15:52+00:00" + "time": "2024-10-09T08:40:40+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "cfb9d34a1cdd4911bc737a5358fd1cf8ebfb536e" + "reference": "728ae8f4e190133ce99d6d5f0bc1e8c8bd7c7a96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/cfb9d34a1cdd4911bc737a5358fd1cf8ebfb536e", - "reference": "cfb9d34a1cdd4911bc737a5358fd1cf8ebfb536e", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/728ae8f4e190133ce99d6d5f0bc1e8c8bd7c7a96", + "reference": "728ae8f4e190133ce99d6d5f0bc1e8c8bd7c7a96", "shasum": "" }, "require": { @@ -3256,7 +3255,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.12" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.13" }, "funding": [ { @@ -3272,7 +3271,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:18:25+00:00" + "time": "2024-10-25T15:07:50+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3343,16 +3342,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.4.8", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b" + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b", - "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", "shasum": "" }, "require": { @@ -3403,7 +3402,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13" }, "funding": [ { @@ -3419,7 +3418,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3499,16 +3498,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12" + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/f810e3cbdf7fdc35983968523d09f349fa9ada12", - "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4856c9cf585d5a0313d8d35afd681a526f038dd3", + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3", "shasum": "" }, "require": { @@ -3545,7 +3544,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.12" + "source": "https://github.com/symfony/filesystem/tree/v6.4.13" }, "funding": [ { @@ -3561,7 +3560,7 @@ "type": "tidelift" } ], - "time": "2024-09-16T16:01:33+00:00" + "time": "2024-10-25T15:07:50+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3966,16 +3965,16 @@ }, { "name": "symfony/string", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b" + "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f8a1ccebd0997e16112dfecfd74220b78e5b284b", - "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b", + "url": "https://api.github.com/repos/symfony/string/zipball/38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", + "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", "shasum": "" }, "require": { @@ -4032,7 +4031,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.12" + "source": "https://github.com/symfony/string/tree/v6.4.13" }, "funding": [ { @@ -4048,20 +4047,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:15:52+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/translation", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "cf8360b8352b086be620fae8342c4d96e391a489" + "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/cf8360b8352b086be620fae8342c4d96e391a489", - "reference": "cf8360b8352b086be620fae8342c4d96e391a489", + "url": "https://api.github.com/repos/symfony/translation/zipball/bee9bfabfa8b4045a66bf82520e492cddbaffa66", + "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66", "shasum": "" }, "require": { @@ -4127,7 +4126,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.12" + "source": "https://github.com/symfony/translation/tree/v6.4.13" }, "funding": [ { @@ -4143,7 +4142,7 @@ "type": "tidelift" } ], - "time": "2024-09-16T06:02:54+00:00" + "time": "2024-09-27T18:14:25+00:00" }, { "name": "symfony/translation-contracts", @@ -4225,16 +4224,16 @@ }, { "name": "symfony/var-exporter", - "version": "v6.4.9", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "f9a060622e0d93777b7f8687ec4860191e16802e" + "reference": "0f605f72a363f8743001038a176eeb2a11223b51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/f9a060622e0d93777b7f8687ec4860191e16802e", - "reference": "f9a060622e0d93777b7f8687ec4860191e16802e", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f605f72a363f8743001038a176eeb2a11223b51", + "reference": "0f605f72a363f8743001038a176eeb2a11223b51", "shasum": "" }, "require": { @@ -4282,7 +4281,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.9" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.13" }, "funding": [ { @@ -4298,20 +4297,20 @@ "type": "tidelift" } ], - "time": "2024-06-24T15:53:56+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/yaml", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "762ee56b2649659380e0ef4d592d807bc17b7971" + "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/762ee56b2649659380e0ef4d592d807bc17b7971", - "reference": "762ee56b2649659380e0ef4d592d807bc17b7971", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", + "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", "shasum": "" }, "require": { @@ -4354,7 +4353,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.12" + "source": "https://github.com/symfony/yaml/tree/v6.4.13" }, "funding": [ { @@ -4370,7 +4369,7 @@ "type": "tidelift" } ], - "time": "2024-09-17T12:47:12+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "theseer/tokenizer", From ceb5d98e41cbabdc9a3036c95b6d589a8ec53fbd Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 4 Nov 2024 10:29:30 +0100 Subject: [PATCH 2/3] ci: Throw JSON errors Signed-off-by: Joas Schilling --- tests/Integration/features/bootstrap/FeatureContext.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Integration/features/bootstrap/FeatureContext.php b/tests/Integration/features/bootstrap/FeatureContext.php index 3c8e472..41e87c8 100644 --- a/tests/Integration/features/bootstrap/FeatureContext.php +++ b/tests/Integration/features/bootstrap/FeatureContext.php @@ -104,12 +104,11 @@ public function createFlow(string $user, string $scope, int $statusCode, TableNo $this->setCurrentUser($user); $formData = $tableNode->getRowsHash(); - $checks = []; foreach ($formData as $key => $value) { if (strpos($key, 'checks-') === 0) { $value = str_replace('{{{FILES_ACCESSCONTROL_INTEGRATIONTEST_TAGID}}}', $this->tagId, $value); - $checks[] = json_decode($value, true); + $checks[] = json_decode($value, true, flags: JSON_THROW_ON_ERROR); unset($formData[$key]); } } From 5e00274cf8cf603d315a102f281b7ae425864ec2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 4 Nov 2024 10:30:17 +0100 Subject: [PATCH 3/3] fix: Double escape of backslashes as per upstream library Signed-off-by: Joas Schilling --- tests/Integration/features/author.feature | 10 ++++----- tests/Integration/features/filename.feature | 4 ++-- .../features/manage-workflows.feature | 6 ++--- tests/Integration/features/mimetypes.feature | 10 ++++----- .../Integration/features/sharing-user.feature | 22 +++++++++---------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/Integration/features/author.feature b/tests/Integration/features/author.feature index eeb41b1..32923a1 100644 --- a/tests/Integration/features/author.feature +++ b/tests/Integration/features/author.feature @@ -11,7 +11,7 @@ Feature: Author | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | And User "test1" uploads file "data/textfile.txt" to "/foobar.txt" Then The webdav response should have a status code "403" Then User "test1" sees no files in the trashbin @@ -25,7 +25,7 @@ Feature: Author | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName","operator":"is","value":"foobar.txt"} | And as user "test1" When Downloading file "/foobar.txt" Then The webdav response should have a status code "404" @@ -42,7 +42,7 @@ Feature: Author | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | When User "test1" uploads file "data/textfile-2.txt" to "/foobar.txt" Then The webdav response should have a status code "403" @@ -55,7 +55,7 @@ Feature: Author | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | When User "test1" deletes file "/foobar.txt" Then The webdav response should have a status code "403" @@ -70,6 +70,6 @@ Feature: Author | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | When User "test1" deletes file "/subdir/foobar.txt" Then The webdav response should have a status code "403" diff --git a/tests/Integration/features/filename.feature b/tests/Integration/features/filename.feature index bad7855..f6e58f8 100644 --- a/tests/Integration/features/filename.feature +++ b/tests/Integration/features/filename.feature @@ -11,8 +11,8 @@ Feature: Author | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "!matches", "value": "\/\\.notexe$\/i"} | - | checks-1 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "matches", "value": "\/^application\\\/(octet-stream\|x-ms-dos-executable\|x-msi\|x-msdos-program)$\/i"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "!matches", "value": "\/\\\\.notexe$\/i"} | + | checks-1 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "matches", "value": "\/^application\\\\\/(octet-stream\|x-ms-dos-executable\|x-msi\|x-msdos-program)$\/i"} | And User "test1" uploads file "data/dosexecutable.exe" to "/definitely.notexe" Then The webdav response should have a status code "201" And User "test1" uploads file "data/dosexecutable.exe" to "/definitely.exe" diff --git a/tests/Integration/features/manage-workflows.feature b/tests/Integration/features/manage-workflows.feature index 667f81a..fa84edd 100644 --- a/tests/Integration/features/manage-workflows.feature +++ b/tests/Integration/features/manage-workflows.feature @@ -10,7 +10,7 @@ Feature: manage-workflows | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "a"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "a"} | Scenario: Users can not create a global flow Given user "test1" creates global flow with 403 @@ -19,7 +19,7 @@ Feature: manage-workflows | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "a"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "a"} | # https://github.com/nextcloud/security-advisories/security/advisories/GHSA-h3c9-cmh8-7qpj Scenario: Users can not create a user flow @@ -29,5 +29,5 @@ Feature: manage-workflows | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "a"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "a"} | diff --git a/tests/Integration/features/mimetypes.feature b/tests/Integration/features/mimetypes.feature index 1b4aacc..170fc9d 100644 --- a/tests/Integration/features/mimetypes.feature +++ b/tests/Integration/features/mimetypes.feature @@ -12,7 +12,7 @@ | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "is", "value": "application/javascript"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "is", "value": "application/javascript"} | Given User "test1" uploads file "data/code.js" to "/code.js" And The webdav response should have a status code "403" And Downloading file "/code.js" as "test1" @@ -26,7 +26,7 @@ | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "is", "value": "text/plain"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "is", "value": "text/plain"} | Given User "test1" uploads file "data/code.js" to "/code.js" And The webdav response should have a status code "201" And Downloading file "/code.js" as "test1" @@ -43,7 +43,7 @@ | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "is", "value": "application/octet-stream"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "is", "value": "application/octet-stream"} | Given User "test1" uploads file "data/hello" to "/hello" And The webdav response should have a status code "403" And Downloading file "/hello" as "test1" @@ -60,7 +60,7 @@ | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "is", "value": "application/x-ms-dos-executable"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "is", "value": "application/x-ms-dos-executable"} | Given User "test1" uploads file "data/nc.exe" to "/nc.exe" And The webdav response should have a status code "403" And Downloading file "/nc.exe" as "test1" @@ -74,7 +74,7 @@ | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "!is", "value": "httpd/unix-directory"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "!is", "value": "httpd/unix-directory"} | Given User "test1" created a folder "/folder" And The webdav response should have a status code "201" When User "test1" moves folder "/folder" to "/folder-renamed" diff --git a/tests/Integration/features/sharing-user.feature b/tests/Integration/features/sharing-user.feature index 577988b..6c0da38 100644 --- a/tests/Integration/features/sharing-user.feature +++ b/tests/Integration/features/sharing-user.feature @@ -12,7 +12,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | And User "test1" uploads file "data/textfile.txt" to "/foobar.txt" Then The webdav response should have a status code "403" @@ -31,7 +31,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | And as user "test2" When Downloading file "/foobar.txt" Then The webdav response should have a status code "403" @@ -48,7 +48,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | And as user "test2" When User "test2" uploads file "data/textfile-2.txt" to "/foobar.txt" Then The webdav response should have a status code "403" @@ -63,7 +63,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | And as user "test2" When User "test2" deletes file "/foobar.txt" Then The webdav response should have a status code "204" @@ -79,7 +79,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileName", "operator": "is", "value": "foobar.txt"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName", "operator": "is", "value": "foobar.txt"} | And as user "test2" When User "test2" deletes file "/subdir/foobar.txt" Then The webdav response should have a status code "403" @@ -91,8 +91,8 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "!is", "value": "httpd/directory"} | - | checks-1 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "!is", "value": "application/pdf"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "!is", "value": "httpd/directory"} | + | checks-1 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "!is", "value": "application/pdf"} | Given User "test1" uploads file "data/nextcloud.pdf" to "/nextcloud.pdf" And The webdav response should have a status code "201" @@ -114,8 +114,8 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "!is", "value": "httpd/directory"} | - | checks-1 | {"class":"OCA\\WorkflowEngine\\Check\\FileMimeType", "operator": "!is", "value": "application/pdf"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "!is", "value": "httpd/directory"} | + | checks-1 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "!is", "value": "application/pdf"} | And Downloading file "/nextcloud2.pdf" as "test2" And The webdav response should have a status code "200" @@ -138,7 +138,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileSystemTags", "operator": "is", "value": "{{{FILES_ACCESSCONTROL_INTEGRATIONTEST_TAGID}}}"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileSystemTags", "operator": "is", "value": "{{{FILES_ACCESSCONTROL_INTEGRATIONTEST_TAGID}}}"} | Then Downloading file "/nextcloud2.txt" as "test2" And The webdav response should have a status code "404" And Downloading file "/nextcloud3.txt" as "test2" @@ -165,7 +165,7 @@ Feature: Sharing user | entity | OCA\WorkflowEngine\Entity\File | | events | [] | | operation | deny | - | checks-0 | {"class":"OCA\\WorkflowEngine\\Check\\FileSystemTags", "operator": "is", "value": "{{{FILES_ACCESSCONTROL_INTEGRATIONTEST_TAGID}}}"} | + | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileSystemTags", "operator": "is", "value": "{{{FILES_ACCESSCONTROL_INTEGRATIONTEST_TAGID}}}"} | Then Downloading file "/nextcloud2.txt" as "test2" And The webdav response should have a status code "200" And Downloading file "/nextcloud3.txt" as "test2"