mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix security requirement
This commit is contained in:
@@ -433,9 +433,9 @@ App::setResource('user', function (string $mode, Document $project, Document $co
|
||||
|
||||
// Account based on account API key
|
||||
$accountKey = $request->getHeader('x-appwrite-key', '');
|
||||
$accountKeyId = $request->getHeader('x-appwrite-user', '');
|
||||
if (!empty($accountKeyId) && !empty($accountKey)) {
|
||||
$accountKeyUser = Authorization::skip(fn () => $dbForPlatform->getDocument('users', $accountKeyId));
|
||||
$accountKeyUserId = $request->getHeader('x-appwrite-user', '');
|
||||
if (!empty($accountKeyUserId) && !empty($accountKey)) {
|
||||
$accountKeyUser = Authorization::skip(fn () => $dbForPlatform->getDocument('users', $accountKeyUserId));
|
||||
if (!$accountKeyUser->isEmpty()) {
|
||||
$key = $accountKeyUser->find(
|
||||
key: 'secret',
|
||||
|
||||
Reference in New Issue
Block a user