diff --git a/app/controllers/general.php b/app/controllers/general.php index 5010d14d44..57b9a6f0f0 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -302,7 +302,7 @@ App::init() Authorization::setRole('role:' . Auth::USER_ROLE_APP); Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys. - if (time() > $key->getAttribute('accessedAt', 0) + APP_KEY_USAGE) { + if (time() > $key->getAttribute('accessedAt', 0) + APP_KEY_ACCCESS) { $key->setAttribute('accessedAt', time()); $sdkValidator = new WhiteList([ 'nodejs', diff --git a/app/init.php b/app/init.php index d09b08a1d8..773b3041e7 100644 --- a/app/init.php +++ b/app/init.php @@ -88,7 +88,7 @@ const APP_LIMIT_COMPRESSION = 20000000; //20MB const APP_LIMIT_ARRAY_PARAMS_SIZE = 100; // Default maximum of how many elements can there be in API parameter that expects array value const APP_LIMIT_ARRAY_ELEMENT_SIZE = 4096; // Default maximum length of element in array parameter represented by maximum URL length. const APP_LIMIT_SUBQUERY = 1000; -const APP_KEY_USAGE = 24 * 60 * 60; // 24 hours +const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_BUSTER = 402; const APP_VERSION_STABLE = '0.15.3'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';