diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-09-27 12:37:23 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-09-27 12:37:23 +0200 |
commit | aa9ffd119aea9a2cb527a0ac662fcdaad464fc68 (patch) | |
tree | f8eafcde6ff03dd8af61ab94f31c23f40478abfb /apps/files_external/ajax/addRootCertificate.php | |
parent | a56f2ec183091dc6d95109806612454c66ce0f07 (diff) | |
download | nextcloud-server-aa9ffd119aea9a2cb527a0ac662fcdaad464fc68.tar.gz nextcloud-server-aa9ffd119aea9a2cb527a0ac662fcdaad464fc68.zip |
check if file really exist before add/remove it
Diffstat (limited to 'apps/files_external/ajax/addRootCertificate.php')
-rw-r--r-- | apps/files_external/ajax/addRootCertificate.php | 5 |
1 files changed, 5 insertions, 0 deletions
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); |