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
This commit is contained in:
commit
fa15c5e636
|
@ -1383,10 +1383,12 @@ function initCore() {
|
||||||
*/
|
*/
|
||||||
function initSessionHeartBeat() {
|
function initSessionHeartBeat() {
|
||||||
// interval in seconds
|
// interval in seconds
|
||||||
var interval = 900;
|
var interval = NaN;
|
||||||
if (oc_config.session_lifetime) {
|
if (oc_config.session_lifetime) {
|
||||||
interval = Math.floor(oc_config.session_lifetime / 2);
|
interval = Math.floor(oc_config.session_lifetime / 2);
|
||||||
}
|
}
|
||||||
|
interval = isNaN(interval)? 900: interval;
|
||||||
|
|
||||||
// minimum one minute
|
// minimum one minute
|
||||||
interval = Math.max(60, interval);
|
interval = Math.max(60, interval);
|
||||||
// max interval in seconds set to 24 hours
|
// max interval in seconds set to 24 hours
|
||||||
|
|
Loading…
Reference in New Issue