From 3fa604cc5edad8efae30cb33b13e3a23ee2494fd Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 10 May 2017 22:26:51 -0500 Subject: Allow to enforce update via web UI * adds a disclaimer that an update via web UI is on own risk * allows to skip the warning * fixes #4353 Signed-off-by: Morris Jobke --- lib/base.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/base.php b/lib/base.php index 483cd656916..0a51d3af5fc 100644 --- a/lib/base.php +++ b/lib/base.php @@ -343,7 +343,10 @@ class OC { $tooBig = ($totalUsers > 50); } } - if ($disableWebUpdater || $tooBig) { + $ignoreTooBigWarning = isset($_GET['IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup']) && + $_GET['IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup'] === 'IAmSuperSureToDoThis'; + + if ($disableWebUpdater || ($tooBig && !$ignoreTooBigWarning)) { // send http status 503 header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); -- cgit v1.2.3