From d8990fba9978d7fd2fa75191809a4f7cea4d4709 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 18 Mar 2021 08:11:23 -0400 Subject: [PATCH 1/4] Upgrade utopia-php/abuse to version 0.4.0 --- CHANGES.md | 4 ++++ composer.json | 2 +- composer.lock | 16 ++++++++-------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e4b9279a1..1b36e78e5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,10 @@ - Anonymous login +## Upgrades + +- Upgraded utopia-php/abuse to version 0.4.0 + # Version 0.7.1 ## Features diff --git a/composer.json b/composer.json index d4135536d..0cd8016d5 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "appwrite/php-clamav": "1.0.*", "utopia-php/framework": "0.10.0", - "utopia-php/abuse": "0.3.*", + "utopia-php/abuse": "0.4.*", "utopia-php/analytics": "0.1.*", "utopia-php/audit": "0.5.*", "utopia-php/cache": "0.2.*", diff --git a/composer.lock b/composer.lock index 18832a1a8..a6e9fc198 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3463ecea7830f29a67317097ad2aeb66", + "content-hash": "15b6e4ddce09e6fb642988603d734aa8", "packages": [ { "name": "adhocore/jwt", @@ -1272,21 +1272,21 @@ }, { "name": "utopia-php/abuse", - "version": "0.3.1", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "23c2eb533bca8f3ef5548ae265398fa7d4d39a1c" + "reference": "2b8cc40a67c045c137b44d1a11326f494acf50a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/23c2eb533bca8f3ef5548ae265398fa7d4d39a1c", - "reference": "23c2eb533bca8f3ef5548ae265398fa7d4d39a1c", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b8cc40a67c045c137b44d1a11326f494acf50a4", + "reference": "2b8cc40a67c045c137b44d1a11326f494acf50a4", "shasum": "" }, "require": { "ext-pdo": "*", - "php": ">=7.1" + "php": ">=7.4" }, "require-dev": { "phpunit/phpunit": "^9.4", @@ -1318,9 +1318,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.3.1" + "source": "https://github.com/utopia-php/abuse/tree/0.4.0" }, - "time": "2020-12-21T17:28:03+00:00" + "time": "2021-03-17T20:21:24+00:00" }, { "name": "utopia-php/analytics", From d6fc03ca63b2d7dfe3caa78fc3a20a519c230075 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 22 Mar 2021 08:44:13 -0400 Subject: [PATCH 2/4] Throw error only on nonzero exit code --- app/workers/certificates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/certificates.php b/app/workers/certificates.php index e8693e356..90907204a 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -124,7 +124,7 @@ class CertificatesV1 ." -w ".APP_STORAGE_CERTIFICATES ." -d {$domain->get()}", '', $stdout, $stderr); - if($stderr || $exit !== 0) { + if($exit !== 0) { throw new Exception('Failed to issue a certificate with message: '.$stderr); } From a76016fa375fc773295c18c9d5920c23deb33a19 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 22 Mar 2021 18:19:05 +0200 Subject: [PATCH 3/4] Fixed functions tests --- app/controllers/api/functions.php | 2 +- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 7a6b11bcd..92708527a 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -435,7 +435,7 @@ App::post('/v1/functions/:functionId/tags') ->label('sdk.response.model', Response::MODEL_TAG) ->param('functionId', '', new UID(), 'Function unique ID.') ->param('command', '', new Text('1028'), 'Code execution command.') - ->param('code', null, new File(), 'Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.', false) + ->param('code', [], new File(), 'Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.', false) ->inject('request') ->inject('response') ->inject('projectDB') diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 9dded8fdd..b04a635cf 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -628,7 +628,7 @@ class FunctionsCustomServerTest extends Scope ], $this->getHeaders()), [ 'tag' => $tagId, ]); - + $this->assertEquals(200, $tag['headers']['status-code']); $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ From 7eb45d30f4cd5a8717f85e0364c59f91799484e3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 22 Mar 2021 22:07:59 +0200 Subject: [PATCH 4/4] Updated change log --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index cc086bb10..184cd763f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,12 @@ - Upgraded ClamAV to version 1.3.0 +# Version 0.7.2 (Not Released Yet) + +## Bugs + +- Fixed certificates worker error on successful operations + # Version 0.7.1 ## Features