Skip to content

Commit

Permalink
Merge pull request #11761 from nextcloud/stable14-11756-ignore-sessio…
Browse files Browse the repository at this point in the history
…n-lifetime-if-it-can-not-be-converted-to-a-number

[stable14] Ignore "session_lifetime" if it can not be converted to a number
  • Loading branch information
MorrisJobke authored Oct 11, 2018
2 parents 55e737a + a246cc1 commit feb8a79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -1402,10 +1402,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
Expand Down

0 comments on commit feb8a79

Please sign in to comment.