From aa9ffd119aea9a2cb527a0ac662fcdaad464fc68 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Thu, 27 Sep 2012 12:37:23 +0200 Subject: check if file really exist before add/remove it --- apps/files_external/ajax/addRootCertificate.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/files_external/ajax/addRootCertificate.php') diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php index 42927b86068..e0a0239c954 100644 --- a/apps/files_external/ajax/addRootCertificate.php +++ b/apps/files_external/ajax/addRootCertificate.php @@ -2,6 +2,11 @@ OCP\JSON::checkAppEnabled('files_external'); +if ( !($filename = $_FILES['rootcert_import']['name']) ) { + header("Location: settings/personal.php"); + exit; +} + $fh = fopen($_FILES['rootcert_import']['tmp_name'], 'r'); $data = fread($fh, filesize($_FILES['rootcert_import']['tmp_name'])); fclose($fh); -- cgit v1.2.3