From dd47f195a01f9eba3f7088ce1bcb7019e064d611 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 28 Jun 2021 12:20:22 +0200 Subject: [PATCH] deps(composer): updated abuse library to 0.5.0 --- app/controllers/shared/api.php | 4 +--- app/workers/deletes.php | 4 +--- composer.json | 2 +- composer.lock | 14 +++++++------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c68e7d86b..4ebe7f32a 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -34,9 +34,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $register, $e /* * Abuse Check */ - $timeLimit = new TimeLimit($route->getLabel('abuse-key', 'url:{url},ip:{ip}'), $route->getLabel('abuse-limit', 0), $route->getLabel('abuse-time', 3600), function () use (&$db) { - return $db; - }); + $timeLimit = new TimeLimit($route->getLabel('abuse-key', 'url:{url},ip:{ip}'), $route->getLabel('abuse-limit', 0), $route->getLabel('abuse-time', 3600), $db); $timeLimit->setNamespace('app_'.$project->getId()); $timeLimit ->setParam('{userId}', $user->getId()) diff --git a/app/workers/deletes.php b/app/workers/deletes.php index f2931de31..a0a5708b6 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -176,9 +176,7 @@ class DeletesV1 extends Worker throw new Exception('Failed to delete audit logs. No timestamp provided'); } - $timeLimit = new TimeLimit("", 0, 1, function () use ($register) { - return $register->get('db'); - }); + $timeLimit = new TimeLimit("", 0, 1, $register->get('db')); $this->deleteForProjectIds(function($projectId) use ($timeLimit, $timestamp){ $timeLimit->setNamespace('app_'.$projectId); diff --git a/composer.json b/composer.json index db99dbfe5..b6d87d91d 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "appwrite/php-runtimes": "0.3.*", "utopia-php/framework": "0.14.*", - "utopia-php/abuse": "0.4.*", + "utopia-php/abuse": "0.5.*", "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.5.*", "utopia-php/cache": "0.2.*", diff --git a/composer.lock b/composer.lock index df5ab61d4..ec3bd3b80 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": "f9c370c2efc59f40eaf02857a7f4e389", + "content-hash": "f0045a975cc1e8215cdfef44472b702f", "packages": [ { "name": "adhocore/jwt", @@ -1327,16 +1327,16 @@ }, { "name": "utopia-php/abuse", - "version": "0.4.2", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "286b52209818e5033573e6441d65adbc48a6f715" + "reference": "339c1720e5aa5314276128170463594b81f84760" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/286b52209818e5033573e6441d65adbc48a6f715", - "reference": "286b52209818e5033573e6441d65adbc48a6f715", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/339c1720e5aa5314276128170463594b81f84760", + "reference": "339c1720e5aa5314276128170463594b81f84760", "shasum": "" }, "require": { @@ -1373,9 +1373,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.4.2" + "source": "https://github.com/utopia-php/abuse/tree/0.5.0" }, - "time": "2021-06-23T15:04:44+00:00" + "time": "2021-06-28T10:11:01+00:00" }, { "name": "utopia-php/analytics",