]> source.dussan.org Git - nextcloud-server.git/commitdiff
dir in newfile has to start with /
authorBart Visscher <bartv@thisnet.nl>
Wed, 24 Oct 2012 15:31:22 +0000 (17:31 +0200)
committerBart Visscher <bartv@thisnet.nl>
Thu, 25 Oct 2012 06:37:13 +0000 (08:37 +0200)
apps/files/ajax/newfile.php

index 77d866979c3cfc61921b77fd66314d03f6aca15f..b87079f2712d1f6b03294e06c04bce58ae0c597b 100644 (file)
@@ -9,7 +9,7 @@ if(!OC_User::isLoggedIn()) {
 
 session_write_close();
 // Get the params
-$dir = isset( $_REQUEST['dir'] ) ? trim($_REQUEST['dir'], '/\\') : '';
+$dir = isset( $_REQUEST['dir'] ) ? '/'.trim($_REQUEST['dir'], '/\\') : '';
 $filename = isset( $_REQUEST['filename'] ) ? trim($_REQUEST['filename'], '/\\') : '';
 $content = isset( $_REQUEST['content'] ) ? $_REQUEST['content'] : '';
 $source = isset( $_REQUEST['source'] ) ? trim($_REQUEST['source'], '/\\') : '';