From a93a79e9e9789b93313555ba5ebc4f1e43883623 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Thu, 7 Mar 2019 10:01:23 +0200 Subject: [PATCH] Fix a bug where user can accidentally cause excessive API calls to be made, resulting in Nightscout consuming a huge amount of resources in the hosting environment (and the API calls probably failing) --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index bafbca9..ccc9b80 100644 --- a/index.js +++ b/index.js @@ -319,6 +319,7 @@ if (!module.parent) { , endpoint: readENV('NS', 'https://' + readENV('WEBSITE_HOSTNAME')) }; var interval = readENV('SHARE_INTERVAL', 60000 * 2.5); + interval = Math.max(60000, interval); var fetch_config = { maxCount: readENV('maxCount', 1) , minutes: readENV('minutes', 1440) };