1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Add Eldad's Suggestion

This commit is contained in:
Bradley Schofield 2021-11-24 09:57:25 +00:00 committed by GitHub
parent 89cc417e3f
commit 6184c4c93b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,9 +40,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $register, $e
$abuseKeyLabel = $route->getLabel('abuse-key', 'url:{url},ip:{ip}');
$timeLimitArray = [];
if (!is_array($abuseKeyLabel)) {
$abuseKeyLabel = [$abuseKeyLabel];
}
$abuseKeyLabel = (!is_array($abuseKeyLabel)) ? [$abuseKeyLabel] : $abuseKeyLabel;
foreach ($abuseKeyLabel as $abuseKey) {
$timeLimit = new TimeLimit($abuseKey, $route->getLabel('abuse-limit', 0), $route->getLabel('abuse-time', 3600), $db);