]> source.dussan.org Git - nextcloud-server.git/commitdiff
disable proxys during ssl root cert upload to avoid encryption
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 12 Jun 2013 08:37:09 +0000 (10:37 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Wed, 12 Jun 2013 08:37:09 +0000 (10:37 +0200)
apps/files_external/ajax/addRootCertificate.php

index 43fd6752c4ae9a1d85d4a95f4362a47cd05fcb1f..ae349bfcd3a5b18499a59b4c20d2f1e96a7c048f 100644 (file)
@@ -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',