From 519508736d03efd765e7985207f35195dd97e7ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= <schiessle@owncloud.com>
Date: Wed, 12 Jun 2013 10:37:09 +0200
Subject: [PATCH] disable proxys during ssl root cert upload to avoid
 encryption

---
 apps/files_external/ajax/addRootCertificate.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index 43fd6752c4..ae349bfcd3 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',
-- 
GitLab