aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/newfile.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-24 17:31:22 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-25 08:37:13 +0200
commit43ac43d7af95df2c4ef8002f9f0556ebc72ae3b0 (patch)
treea5a92e1aea6d721239459e21c588f86bcd79cd9b /apps/files/ajax/newfile.php
parent43bae1b47312d203bd4431b6cdc684acf09ebd6e (diff)
downloadnextcloud-server-43ac43d7af95df2c4ef8002f9f0556ebc72ae3b0.tar.gz
nextcloud-server-43ac43d7af95df2c4ef8002f9f0556ebc72ae3b0.zip
dir in newfile has to start with /
Diffstat (limited to 'apps/files/ajax/newfile.php')
-rw-r--r--apps/files/ajax/newfile.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 77d866979c3..b87079f2712 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -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'], '/\\') : '';