Merge pull request #11763 from nextcloud/stable12-11756-ignore-session-lifetime-if-it-can-not-be-converted-to-a-number

[stable12] Ignore "session_lifetime" if it can not be converted to a number
This commit is contained in:
Morris Jobke 2018-10-11 14:44:30 +02:00 committed by GitHub
commit 8574915a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1347,10 +1347,12 @@ function initCore() {
// max interval in seconds set to 24 hours
var maxInterval = 24 * 3600;
// 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
if (interval < 60) {
interval = 60;