From e64aa330fdd6ce6180a0ffcf3634dbcae31abfff Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 21 Aug 2014 14:09:40 +0200 Subject: [PATCH] check for blacklisted file certificate filenames --- lib/private/security/certificatemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/security/certificatemanager.php b/lib/private/security/certificatemanager.php index 2888fecd23..64a1d6431a 100644 --- a/lib/private/security/certificatemanager.php +++ b/lib/private/security/certificatemanager.php @@ -78,7 +78,7 @@ class CertificateManager implements ICertificateManager { * @return bool | \OCP\ICertificate */ public function addCertificate($certificate, $name) { - if (!\OC\Files\Filesystem::isValidPath($name)) { + if (!Filesystem::isValidPath($name) or Filesystem::isFileBlacklisted($name)) { return false; } $isValid = openssl_pkey_get_public($certificate);