summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-06-12 03:55:10 -0700
committerBjörn Schießle <bjoern@schiessle.org>2013-06-12 03:55:10 -0700
commit40e74b59079ab53274b0cc58b81aba2cf1876632 (patch)
treea8021d2cc68279526909be9f11b329aebc05ad01
parentde5eed4fb0363855da47b93fa94ad03e13bd7159 (diff)
parent519508736d03efd765e7985207f35195dd97e7ca (diff)
downloadnextcloud-server-40e74b59079ab53274b0cc58b81aba2cf1876632.tar.gz
nextcloud-server-40e74b59079ab53274b0cc58b81aba2cf1876632.zip
Merge pull request #3682 from owncloud/disable_proxys_on_sslcert_upload
disable proxys during ssl root cert upload to avoid encryption
-rw-r--r--apps/files_external/ajax/addRootCertificate.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index 43fd6752c4a..ae349bfcd3a 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -29,8 +29,12 @@ if ($isValid == false) {
// add the certificate if it could be verified
if ( $isValid ) {
+ // disable proxy to prevent multiple fopen calls
+ $proxyStatus = \OC_FileProxy::$enabled;
+ \OC_FileProxy::$enabled = false;
$view->file_put_contents($filename, $data);
OC_Mount_Config::createCertificateBundle();
+ \OC_FileProxy::$enabled = $proxyStatus;
} else {
OCP\Util::writeLog('files_external',
'Couldn\'t import SSL root certificate ('.$filename.'), allowed formats: PEM and DER',