summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-09-17 17:34:49 +0200
committerBart Visscher <bartv@thisnet.nl>2012-09-17 20:00:31 +0200
commitb1bab6d11345275f384eeda4d20b8b280d8bfb93 (patch)
tree8dbd2e5338e7ccae6d950da3af0e87d7170f3665
parentb04c7175dc89cb53b4719f140d65df01bdce1301 (diff)
downloadnextcloud-server-b1bab6d11345275f384eeda4d20b8b280d8bfb93.tar.gz
nextcloud-server-b1bab6d11345275f384eeda4d20b8b280d8bfb93.zip
Check format of chunked filename
-rw-r--r--lib/connector/sabre/directory.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 39606577f6d..b5049d800c4 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()) {