diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-03-16 12:27:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 12:27:26 +0100 |
commit | 57c1be8633103f2e2ca74bad186c332713f4ef83 (patch) | |
tree | a4b6b444ffcce7162ba8d2805ebc999526c9636b /lib | |
parent | 7ca2f5f1374e2a1493c652772b4392f844346c52 (diff) | |
parent | 786ee72146773966ed774ee9a8128fbb2a2a713a (diff) | |
download | nextcloud-server-57c1be8633103f2e2ca74bad186c332713f4ef83.tar.gz nextcloud-server-57c1be8633103f2e2ca74bad186c332713f4ef83.zip |
Merge pull request #3802 from Ko-/master
Check that set_time_limit is not disabled before calling it
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) { |