diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-10-11 11:42:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 11:42:41 +0200 |
commit | fa15c5e636398535b29801c3d233dc3661e7d772 (patch) | |
tree | 6a1462277d264feee805e3be1247ce54319cab8b | |
parent | 82d4732a019afd2ea4b8f4031d2b9e47ec3e0ae7 (diff) | |
parent | c2916b62d3faf36200dc7c6c314449287f47e32c (diff) | |
download | nextcloud-server-fa15c5e636398535b29801c3d233dc3661e7d772.tar.gz nextcloud-server-fa15c5e636398535b29801c3d233dc3661e7d772.zip |
Merge pull request #11756 from nextcloud/ignore-session-lifetime-if-it-can-not-be-converted-to-a-number
Ignore "session_lifetime" if it can not be converted to a number
-rw-r--r-- | core/js/js.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js index e7e1c301bb5..d78b0159cfa 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1383,10 +1383,12 @@ function initCore() { */ function initSessionHeartBeat() { // interval in seconds - var interval = 900; + var interval = NaN; if (oc_config.session_lifetime) { interval = Math.floor(oc_config.session_lifetime / 2); } + interval = isNaN(interval)? 900: interval; + // minimum one minute interval = Math.max(60, interval); // max interval in seconds set to 24 hours |