mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Refactor: Update database authorization handling in realtime.php and regenerate composer.lock
This commit is contained in:
+5
-3
@@ -645,8 +645,10 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re
|
||||
$database = getConsoleDB();
|
||||
|
||||
if ($projectId !== 'console') {
|
||||
$project = $database->getAuthorization()->skip(fn () => $database->getDocument('projects', $projectId));
|
||||
$database = getProjectDB($project, $database->getAuthorization());
|
||||
$authorization = $database->getAuthorization();
|
||||
$project = $authorization->skip(fn () => $database->getDocument('projects', $projectId));
|
||||
$database = getProjectDB($project);
|
||||
$database->setAuthorization($authorization);
|
||||
} else {
|
||||
$project = null;
|
||||
}
|
||||
@@ -656,7 +658,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re
|
||||
*
|
||||
* Abuse limits are sending 32 times per minute and connection.
|
||||
*/
|
||||
$timeLimit = getTimelimit('url:{url},connection:{connection}', 32, 60);
|
||||
$timeLimit = new TimeLimitRedis('url:{url},connection:{connection}', 32, 60, getRedis());
|
||||
|
||||
$timeLimit
|
||||
->setParam('{connection}', $connection)
|
||||
|
||||
Generated
+1
-1
@@ -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": "46333fff6a2fce6d593be22b32cdf282",
|
||||
"content-hash": "1167f8ad5c99b75e2c76109ccd1e5772",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
||||
Reference in New Issue
Block a user