[BUGFIX] Avoid calling login refresh poll too often 82/49882/2
authorHelmut Hummel <info@helhum.io>
Thu, 8 Sep 2016 11:18:50 +0000 (13:18 +0200)
committerHelmut Hummel <typo3@helhum.io>
Thu, 8 Sep 2016 21:48:28 +0000 (23:48 +0200)
Resolves: #77885
Releases: master
Change-Id: I59576eb444c730cb4b292f8d13dd68eb0b96822b
Reviewed-on: https://review.typo3.org/49882
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js

index c9097b6..7cc4827 100644 (file)
@@ -94,7 +94,8 @@ define(['jquery', 'TYPO3/CMS/Backend/Notification', 'TYPO3/CMS/Rsaauth/RsaEncryp
         * @param {integer} intervalTime
         */
        LoginRefresh.setIntervalTime = function(intervalTime) {
-               LoginRefresh.intervalTime = intervalTime;
+               // To avoid the integer overflow in setInterval, we limit the interval time to be one request per day
+               LoginRefresh.intervalTime = Math.min(intervalTime, 86400);
        };
 
        /**