Deprecated changes

This commit is contained in:
fogelito
2024-01-22 19:24:12 +02:00
parent 52c3863589
commit 37bdb17cc6
6 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -521,7 +521,7 @@ App::get('/v1/avatars/initials')
// if there is no space, try to split by `_` underscore
$words = (count($words) == 1) ? \explode('_', \strtoupper($name)) : $words;
$initials = null;
$initials = '';
$code = 0;
foreach ($words as $key => $w) {
+1 -1
View File
@@ -3934,7 +3934,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage')
};
$stats[$metric][] = [
'value' => 0,
'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)),
'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? 'now'), -1 * $diff)),
];
$backfill--;
}
+1 -1
View File
@@ -385,7 +385,7 @@ App::get('/v1/projects/:projectId/usage')
};
$stats[$metric][] = [
'value' => 0,
'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)),
'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? 'now'), -1 * $diff)),
];
$backfill--;
}
+1 -1
View File
@@ -1844,7 +1844,7 @@ App::get('/v1/users/usage')
};
$stats[$metric][] = [
'value' => 0,
'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)),
'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? 'now'), -1 * $diff)),
];
$backfill--;
}
+2 -1
View File
@@ -60,7 +60,8 @@ class Scryptmodified extends Hash
$saltBytes = \base64_decode($options['salt']);
$saltSeparatorBytes = \base64_decode($options['saltSeparator']);
$derivedKey = \scrypt(\utf8_encode($password), $saltBytes . $saltSeparatorBytes, 16384, 8, 1, 64);
$password = mb_convert_encoding($password, 'UTF-8');
$derivedKey = \scrypt($password, $saltBytes . $saltSeparatorBytes, 16384, 8, 1, 64);
$derivedKey = \hex2bin($derivedKey);
return $derivedKey;
+4 -4
View File
@@ -43,10 +43,10 @@ class PersonalData extends Password
if (!$this->strict) {
$password = strtolower($password);
$this->userId = strtolower($this->userId);
$this->email = strtolower($this->email);
$this->name = strtolower($this->name);
$this->phone = strtolower($this->phone);
$this->userId = strtolower($this->userId ?? '');
$this->email = strtolower($this->email ?? '');
$this->name = strtolower($this->name ?? '');
$this->phone = strtolower($this->phone ?? '');
}
if ($this->userId && strpos($password, $this->userId) !== false) {