summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax/addRootCertificate.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/ajax/addRootCertificate.php')
-rw-r--r--apps/files_external/ajax/addRootCertificate.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index e0a0239c954..72eb30009d1 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -3,23 +3,23 @@
OCP\JSON::checkAppEnabled('files_external');
if ( !($filename = $_FILES['rootcert_import']['name']) ) {
- header("Location: settings/personal.php");
+ header("Location: settings/personal.php");
exit;
}
-$fh = fopen($_FILES['rootcert_import']['tmp_name'], 'r');
-$data = fread($fh, filesize($_FILES['rootcert_import']['tmp_name']));
+$fh = fopen($_FILES['rootcert_import']['tmp_name'], 'r');
+$data = fread($fh, filesize($_FILES['rootcert_import']['tmp_name']));
fclose($fh);
$filename = $_FILES['rootcert_import']['name'];
-
-$view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_external/uploads');
+
+$view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_external/uploads');
if (!$view->file_exists('')) $view->mkdir('');
$isValid = openssl_pkey_get_public($data);
//maybe it was just the wrong file format, try to convert it...
if ($isValid == false) {
- $data = chunk_split(base64_encode($data), 64, "\n");
+ $data = chunk_split(base64_encode($data), 64, "\n");
$data = "-----BEGIN CERTIFICATE-----\n".$data."-----END CERTIFICATE-----\n";
$isValid = openssl_pkey_get_public($data);
}