From b1bab6d11345275f384eeda4d20b8b280d8bfb93 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Mon, 17 Sep 2012 17:34:49 +0200 Subject: [PATCH] Check format of chunked filename --- lib/connector/sabre/directory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index 39606577f6..b5049d800c 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -50,6 +50,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa public function createFile($name, $data = null) { if (isset($_SERVER['HTTP_OC_CHUNKED'])) { $info = OC_FileChunking::decodeName($name); + if (empty($info)) { + throw new Sabre_DAV_Exception_NotImplemented(); + } $chunk_handler = new OC_FileChunking($info); $chunk_handler->store($info['index'], $data); if ($chunk_handler->isComplete()) {