From dc0adbad02f614eb0a94db2732dc893e7cb5aa5a Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Tue, 12 Jun 2012 19:52:25 +0200 Subject: [PATCH 1/6] increase possible size of uri in database - fix oc-140 --- apps/calendar/appinfo/database.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/calendar/appinfo/database.xml b/apps/calendar/appinfo/database.xml index b065ab3f94..5a3ad32dc2 100644 --- a/apps/calendar/appinfo/database.xml +++ b/apps/calendar/appinfo/database.xml @@ -81,7 +81,7 @@ text false - 100 + 255 @@ -133,7 +133,7 @@ text false - 100 + 255 From deb2f87556fc850632e52dda42462dedde2304ef Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Tue, 12 Jun 2012 19:53:26 +0200 Subject: [PATCH 2/6] increase version of calendar app to force db upgrade --- apps/calendar/appinfo/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/calendar/appinfo/version b/apps/calendar/appinfo/version index e6adf3fc7b..267577d47e 100644 --- a/apps/calendar/appinfo/version +++ b/apps/calendar/appinfo/version @@ -1 +1 @@ -0.4 \ No newline at end of file +0.4.1 From 790ae70e321713007863705d4a444edc2e53791e Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 12 Jun 2012 15:25:13 -0400 Subject: [PATCH 3/6] Create directory for mount point if it doesn't already exist --- lib/filesystem.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/filesystem.php b/lib/filesystem.php index 454bb1aa81..ccbb431975 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -319,6 +319,9 @@ class OC_Filesystem{ if(substr($mountpoint,-1)!=='/'){ $mountpoint=$mountpoint.'/'; } + if ($mountpoint != '/' && !self::is_dir(basename($mountpoint))) { + self::mkdir(basename($mountpoint)); + } self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments); } From 521294d0bf9803cb4ffdc6fb43bd9b9253fece40 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Tue, 12 Jun 2012 23:15:44 +0200 Subject: [PATCH 4/6] fixes http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-987 --- lib/config.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/config.php b/lib/config.php index e3a9c11f24..9279549b1b 100644 --- a/lib/config.php +++ b/lib/config.php @@ -170,14 +170,18 @@ class OC_Config{ } $content .= ");\n?>\n"; + $filename = OC::$SERVERROOT."/config/config.php"; // Write the file - $result=@file_put_contents( OC::$SERVERROOT."/config/config.php", $content ); + $result=@file_put_contents( $filename, $content ); if(!$result) { $tmpl = new OC_Template( '', 'error', 'guest' ); $tmpl->assign('errors',array(1=>array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud"))); $tmpl->printPage(); exit; } + // Prevent others not to read the config + @chmod($filename, 0640); + return true; } } From db1353655b1d27c545e438e3d36b0d5889a91668 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Wed, 13 Jun 2012 00:32:44 +0200 Subject: [PATCH 5/6] check for view before trying to invoke method on object --- lib/filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filesystem.php b/lib/filesystem.php index ccbb431975..dd74daffa4 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -319,7 +319,7 @@ class OC_Filesystem{ if(substr($mountpoint,-1)!=='/'){ $mountpoint=$mountpoint.'/'; } - if ($mountpoint != '/' && !self::is_dir(basename($mountpoint))) { + if (self::getView() != null && $mountpoint != '/' && !self::is_dir(basename($mountpoint))) { self::mkdir(basename($mountpoint)); } self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments); From 6f55a528581f5e6ef830cb107f2cdf756ad2f79e Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 12 Jun 2012 21:33:05 -0400 Subject: [PATCH 6/6] Fix incorrect creation of filesystem for user@group in data folder during shares --- apps/files_sharing/lib_share.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php index cf5456d704..356c958b6c 100644 --- a/apps/files_sharing/lib_share.php +++ b/apps/files_sharing/lib_share.php @@ -104,10 +104,6 @@ class OC_Share { $counter++; } } - if (isset($gid)) { - $uid = $uid."@".$gid; - } - $query->execute(array($uid_owner, $uid, $source, $target, $permissions)); // Update mtime of shared folder to invoke a file cache rescan $rootView=new OC_FilesystemView('/'); if (!$rootView->is_dir($sharedFolder)) { @@ -119,6 +115,10 @@ class OC_Share { $rootView->mkdir($sharedFolder); } $rootView->touch($sharedFolder); + if (isset($gid)) { + $uid = $uid."@".$gid; + } + $query->execute(array($uid_owner, $uid, $source, $target, $permissions)); } } }