Commit graph

98 commits

Author SHA1 Message Date
Lukas Reschke
cf752bea22 Merge pull request #2485 from nextcloud/shared-storage-mask-10
[10] 	apply permissions mask for shared storage
2016-12-03 23:35:40 +01:00
Robin Appelman
d84f88b041
only update the cache if the storage operation succeeds
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 18:56:11 +01:00
Robin Appelman
2dd97bb52d
apply permissions mask for shared storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 18:02:34 +01:00
Lukas Reschke
072794d78d
[stable10] Prevent endless loop in \OC\Files\View::createParentDirectories
\OC\Files\View::createParentDirectories was previously prone to an endless loop. If a path such as /foo/existingfile.txt/bar/foo was passed and existingfile.txt existed in foo the loop was never left and running until the PHP process timed out.

This commit changes the logic to a foreach loop over an array and additionally additional error handling using is_file.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-01 16:53:26 +01:00
Vincent Petry
db8b66c546
Hack to prevent warning for read-only wrapper in public links
Storage wrappers should normally always be registered inside a presetup
hook. However in the public link scenario this is not possible and
there is currently no good alternative with the current architecture.

Instead of logging a warning every time, this fix prevents the warning
to be shown but also adds a FIXME in the code for the future. This is
ok because this app is already using private/internal APIs at the
moment and should be reworked properly in the future.
2016-11-17 17:00:49 +01:00
Arthur Schiwon
6a2e51b4d9
make AvatarManager use LazyRootFolder, fixes #1251
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-12 14:08:12 +02:00
Morris Jobke
3e93dbd404 Merge pull request #1522 from nextcloud/stable9.1-3f53730159d94bbc2b53129a4c750f5bab40a26e
[stable10] Fix mimetype detection inside hidden folders (#26138) (#2…
2016-09-28 22:03:02 +02:00
Vincent Petry
4cbdf51ddb
Only use realpath for real directories (#26060)
In some cross-local-storage use cases, the Local storage is
instantiated with "/" as data directory. In such cases, calling
realpath() would cause PHP warnings when open_basedir is set.

This fix bypasses the realpath() call when dealing with a root storage.

Downstreaming of https://github.com/owncloud/core/pull/26060

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 00:15:27 +02:00
Morris Jobke
85d7b90b24 Revert "[stable10] Only use realpath for real directories (#26060)" 2016-09-27 00:12:23 +02:00
Thomas Müller
fca4098fac
[stable9.1] Fix mimetype detection inside hidden folders (#26138) (#26151)
Downstreaming of https://github.com/owncloud/core/pull/26151

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 11:33:13 +02:00
Vincent Petry
7535d3e391
Only use realpath for real directories (#26060)
In some cross-local-storage use cases, the Local storage is
instantiated with "/" as data directory. In such cases, calling
realpath() would cause PHP warnings when open_basedir is set.

This fix bypasses the realpath() call when dealing with a root storage.

Downstreaming of https://github.com/owncloud/core/pull/26060

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 11:22:46 +02:00
Joas Schilling
810f99c1c9
Correctly remove the charset from finfo mimetype 2016-09-08 09:20:34 +02:00
Vincent Petry
c4f303d19c
Prevent error with orphaned shares when updating user mount cache 2016-08-30 19:45:22 +02:00
Robin Appelman
fa980af53c prevent infinite recursion while getting storage from mount 2016-08-23 13:59:01 +02:00
Robin Appelman
a1fd9d275f Allow jail wrappers to lazily initialize the source storage 2016-08-22 12:41:04 +02:00
Robin Appelman
2a2f1b9a00 Allow storage wrappers to lazily initialize the source storage 2016-08-22 12:40:16 +02:00
Lukas Reschke
550c5ee7c4 Merge pull request #811 from nextcloud/shared-cachethepropagatorinstance-stable10
Store the shared propagator instance
2016-08-10 17:24:44 +02:00
Lukas Reschke
93677b2ca3 Merge pull request #817 from nextcloud/jail-root-stable10
[stable10] getJailedPath expects $path to have a trailing /
2016-08-10 16:04:13 +02:00
Robin Appelman
5321a8728e get shared storage storage id without setting up the storage 2016-08-10 13:05:32 +02:00
Thomas Müller
2e0e2064e8
Adding test case for getPathById including a jailed cache where root is just empty 2016-08-10 11:29:11 +02:00
Thomas Müller
0253300e2a
getJailedPath expects $path to have a trailing / - fixes #25464 2016-08-10 11:29:02 +02:00
Vincent Petry
5edd5100fe
Store the shared propagator instance
This instead of recreating it for every call.
2016-08-10 10:59:56 +02:00
Joas Schilling
23b205ed48
Run the license script 2016-07-22 11:40:41 +02:00
Robin Appelman
29eeeb2273 Save the files external mount id in the mount cache table 2016-07-13 16:34:08 +02:00
Morris Jobke
c2d88a08b7
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
2016-07-08 15:55:17 +02:00
Thomas Müller
d2d99a91a0 fix swift primary object store test (#25281)
* Wait for socket to be open

* Fix call on null

* Allow DB access for MountProviderTest

Makes unit tests pass when using object store, since their FS access is
actually oc_filecache DB access. It is currently not possible to mock
or bypass the logic from "SharedMount::verifyMountPoint()" triggered by
this test.
2016-07-05 08:54:51 +02:00
Hendrik Leppelsack
11be3d6276 remove png references in core 2016-07-01 16:36:37 +02:00
Robin Appelman
2a72eff9ee Fix getting the certificate bundle for dav external storage (#25274)
* Fix getting the certificate bundle for dav external storages

* Log the original exception in dav external storage
2016-06-27 22:26:43 +02:00
Robin Appelman
88ef163276 handle unavailable fed shares while testing for availability (#25277)
* More explicit http status codes

* handle unavailable fed shares while testing for availability
2016-06-27 21:34:28 +02:00
karakayasemi
c8b7a059b4
Fire hooks for mkdir for folder upload
fromTmpFile function, usual mkdir call is only working for file's parent
directory. Does not care upper parent folders. I added a recursive
function that creates parent non-existing folders with usual mkdir.
2016-06-21 17:10:52 +02:00
Vincent Petry
5de6432441 Merge pull request #25056 from owncloud/fs-usermountcache-capped
Capped cache for cache info in UserMountCache
2016-06-15 13:01:28 +02:00
Vincent Petry
f163eedfa2 Merge pull request #25102 from owncloud/preview-delete-performance
Preview delete performance
2016-06-15 11:58:50 +02:00
Robin Appelman
01d9ad6b14 optimized size propagation on deletes 2016-06-14 17:17:43 +02:00
Vincent Petry
86d7241be2
Capped cache for cache info in UserMountCache 2016-06-13 15:08:12 +02:00
Robin Appelman
338cd4033a handle invalid storages in LazyStorageMountInfo 2016-06-13 13:31:45 +02:00
Vincent Petry
52a0c939ab Merge pull request #24863 from owncloud/propagator-batching
Propagator batching for the file scanner
2016-06-10 17:45:52 +02:00
Vincent Petry
0e3737ffe1 Merge pull request #25028 from owncloud/scanner-user-not-setup
skip scanning for a user when the user is not setup yet
2016-06-09 10:29:46 +02:00
Robin Appelman
808438efc0 skip scanning for a user when the user is not setup yet 2016-06-08 14:19:42 +02:00
Vincent Petry
8d0948977e Merge pull request #24899 from owncloud/local-storage-symlinks
dissalow symlinks in local storages that point outside the datadir
2016-06-08 10:19:24 +02:00
Robin Appelman
2cf7ad8c55 make sure $data['mtime'] is always a timestamp 2016-06-07 17:09:24 +02:00
Robin Appelman
6822689e38 don't update storage mtime if we can't get the modified date 2016-06-07 15:04:24 +02:00
Robin Appelman
73547f29be Ignore forbidden files while scanning 2016-06-07 14:01:55 +02:00
Robin Appelman
7b1b723e5b dissalow symlinks in local storages that point outside the datadir 2016-06-07 14:01:53 +02:00
Robin Appelman
6bc8305edd Fix warnings when trying to get mtime of non existing files 2016-06-03 13:35:27 +02:00
Robin Appelman
14f96f86e7 return success when deleting ghost files 2016-06-03 13:34:54 +02:00
Robin Appelman
63408fa6ef allow deleting "ghost files" trough the View and Node api 2016-06-03 13:30:59 +02:00
Georg Ehrke
89a10fdb2d
normalize path in getInternalPath 2016-06-02 19:11:35 +02:00
Robin Appelman
fce19d22d9 fix mtime propagation on sqlite 2016-06-02 15:43:43 +02:00
Robin Appelman
cc67ad4dda use propagator batching in the scanner 2016-06-02 15:07:50 +02:00
Robin Appelman
9fb44e34af add propagator batching 2016-06-02 15:07:47 +02:00