summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-03-16 12:27:26 +0100
committerGitHub <noreply@github.com>2017-03-16 12:27:26 +0100
commit57c1be8633103f2e2ca74bad186c332713f4ef83 (patch)
treea4b6b444ffcce7162ba8d2805ebc999526c9636b /settings
parent7ca2f5f1374e2a1493c652772b4392f844346c52 (diff)
parent786ee72146773966ed774ee9a8128fbb2a2a713a (diff)
downloadnextcloud-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 'settings')
-rw-r--r--settings/Controller/CheckSetupController.php15
-rw-r--r--settings/Controller/EncryptionController.php4
2 files changed, 18 insertions, 1 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 016f6a1dab2..5e2aa365f67 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.php
@@ -286,6 +286,20 @@ class CheckSetupController extends Controller {
}
/**
+ * Checks if set_time_limit is not disabled.
+ *
+ * @return bool
+ */
+ private function isSettimelimitAvailable() {
+ if (function_exists('set_time_limit')
+ && strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* @return RedirectResponse
*/
public function rescanFailedIntegrityCheck() {
@@ -411,6 +425,7 @@ Raw output
'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
+ 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
]
);
}
diff --git a/settings/Controller/EncryptionController.php b/settings/Controller/EncryptionController.php
index cda50853fdc..0c8dd529a7d 100644
--- a/settings/Controller/EncryptionController.php
+++ b/settings/Controller/EncryptionController.php
@@ -105,7 +105,9 @@ class EncryptionController extends Controller {
*/
public function startMigration() {
// allow as long execution on the web server as possible
- set_time_limit(0);
+ if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ @set_time_limit(0);
+ }
try {