1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

deps(composer): updated abuse library to 0.5.0

This commit is contained in:
Torsten Dittmann 2021-06-28 12:20:22 +02:00
parent 49fa26b18c
commit dd47f195a0
4 changed files with 10 additions and 14 deletions

View file

@ -34,9 +34,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $register, $e
/* /*
* Abuse Check * 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) { $timeLimit = new TimeLimit($route->getLabel('abuse-key', 'url:{url},ip:{ip}'), $route->getLabel('abuse-limit', 0), $route->getLabel('abuse-time', 3600), $db);
return $db;
});
$timeLimit->setNamespace('app_'.$project->getId()); $timeLimit->setNamespace('app_'.$project->getId());
$timeLimit $timeLimit
->setParam('{userId}', $user->getId()) ->setParam('{userId}', $user->getId())

View file

@ -176,9 +176,7 @@ class DeletesV1 extends Worker
throw new Exception('Failed to delete audit logs. No timestamp provided'); throw new Exception('Failed to delete audit logs. No timestamp provided');
} }
$timeLimit = new TimeLimit("", 0, 1, function () use ($register) { $timeLimit = new TimeLimit("", 0, 1, $register->get('db'));
return $register->get('db');
});
$this->deleteForProjectIds(function($projectId) use ($timeLimit, $timestamp){ $this->deleteForProjectIds(function($projectId) use ($timeLimit, $timestamp){
$timeLimit->setNamespace('app_'.$projectId); $timeLimit->setNamespace('app_'.$projectId);

View file

@ -39,7 +39,7 @@
"appwrite/php-runtimes": "0.3.*", "appwrite/php-runtimes": "0.3.*",
"utopia-php/framework": "0.14.*", "utopia-php/framework": "0.14.*",
"utopia-php/abuse": "0.4.*", "utopia-php/abuse": "0.5.*",
"utopia-php/analytics": "0.2.*", "utopia-php/analytics": "0.2.*",
"utopia-php/audit": "0.5.*", "utopia-php/audit": "0.5.*",
"utopia-php/cache": "0.2.*", "utopia-php/cache": "0.2.*",

14
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f9c370c2efc59f40eaf02857a7f4e389", "content-hash": "f0045a975cc1e8215cdfef44472b702f",
"packages": [ "packages": [
{ {
"name": "adhocore/jwt", "name": "adhocore/jwt",
@ -1327,16 +1327,16 @@
}, },
{ {
"name": "utopia-php/abuse", "name": "utopia-php/abuse",
"version": "0.4.2", "version": "0.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/utopia-php/abuse.git", "url": "https://github.com/utopia-php/abuse.git",
"reference": "286b52209818e5033573e6441d65adbc48a6f715" "reference": "339c1720e5aa5314276128170463594b81f84760"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/286b52209818e5033573e6441d65adbc48a6f715", "url": "https://api.github.com/repos/utopia-php/abuse/zipball/339c1720e5aa5314276128170463594b81f84760",
"reference": "286b52209818e5033573e6441d65adbc48a6f715", "reference": "339c1720e5aa5314276128170463594b81f84760",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1373,9 +1373,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/utopia-php/abuse/issues", "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", "name": "utopia-php/analytics",