diff options
author | Ko- <k.stoffelen@cs.ru.nl> | 2017-03-11 17:04:21 +0100 |
---|---|---|
committer | Ko- <k.stoffelen@cs.ru.nl> | 2017-03-11 17:04:21 +0100 |
commit | 0024b67aaf1b5fd79a2e73789a4c903364162e54 (patch) | |
tree | c01ec94b8d871b0905ed550391ac7be5e5b10e52 /lib | |
parent | 801b600ec348edab2447866b349a0d163db94f15 (diff) | |
download | nextcloud-server-0024b67aaf1b5fd79a2e73789a4c903364162e54.tar.gz nextcloud-server-0024b67aaf1b5fd79a2e73789a4c903364162e54.zip |
Check that set_time_limit is not disabled before calling it
Signed-off-by: Ko- <k.stoffelen@cs.ru.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 4 | ||||
-rw-r--r-- | lib/private/legacy/files.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index 68178b06c5b..04b6d82b1df 100644 --- a/lib/base.php +++ b/lib/base.php @@ -616,7 +616,9 @@ class OC { //Let´s try to overwrite some defaults anyway //try to set the maximum execution time to 60min - @set_time_limit(3600); + if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { + @set_time_limit(3600); + } @ini_set('max_execution_time', 3600); @ini_set('max_input_time', 3600); diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php index 8c9adad0d49..ed3aa719409 100644 --- a/lib/private/legacy/files.php +++ b/lib/private/legacy/files.php @@ -147,7 +147,9 @@ class OC_Files { $streamer->sendHeaders($name); $executionTime = intval(OC::$server->getIniWrapper()->getNumeric('max_execution_time')); - set_time_limit(0); + if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { + @set_time_limit(0); + } ignore_user_abort(true); if ($getType === self::ZIP_FILES) { foreach ($files as $file) { |