Robin Appelman
269747985e
Add a more powerful notify mechanism
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-27 10:44:33 +01:00
Lukas Reschke
29f5ab1758
Merge pull request #3238 from nextcloud/dav-test
...
Make DAV external storage test more reliable
2017-01-26 18:43:36 +01:00
Robin Appelman
2520a4831b
Make sure we use the correct storage id when scanning a jailed storage
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-25 17:03:45 +01:00
Morris Jobke
95ab46e3d2
Merge pull request #3030 from nextcloud/filesapi-renamefailcase
...
Fix files node API failed rename/copy
2017-01-24 21:23:59 -06:00
Robin Appelman
38ec2a35f2
Make DAV external storage test more reliable
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-24 16:56:24 +01:00
Robin Appelman
d4d116503c
Merge pull request #3212 from mwalbeck/mimetype-hidden-files
...
Mimetype detection for hidden files
2017-01-23 21:45:16 +01:00
Magnus Walbeck
3d99ec6832
Reduced code for filename trim
...
Signed-off-by: Magnus Walbeck <mw@mwalbeck.org>
2017-01-23 17:14:39 +01:00
Magnus Walbeck
eadc1ac637
Mimetype detection for hidden files
...
Signed-off-by: Magnus Walbeck <mw@mwalbeck.org>
2017-01-23 13:28:35 +01:00
Vincent Petry
0aaf209c66
Prevent PHP request to get killed when using fclose callback ( #26775 )
...
* Prevent PHP request to get killed when using fclose callback
* Add ignore_user_abort everywhere where the time limit is set to 0
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-23 12:33:20 +01:00
Vincent Petry
e667b28298
Fix files node API failed rename/copy
...
Whenever a rename or copy operation failed on the view, we must throw
an exception instead of just ignoring.
Signed-off-by: Vincent Petry <pvince81@owncloud.com>
2017-01-12 13:52:59 +01:00
Vincent Petry
eb5ea0e260
Refactor files node API for more code reuse
...
Signed-off-by: Vincent Petry <pvince81@owncloud.com>
2017-01-11 14:53:42 +01:00
Roeland Jago Douma
447e388ce9
Merge pull request #2744 from nextcloud/oc_26324
...
[downstream] Fix DAV stat cache to properly cache 404
2017-01-11 08:16:40 +01:00
Roeland Jago Douma
00b17c3af5
Only check for local shared storages
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-01-10 16:14:21 +01:00
Vincent Petry
706655ef20
Skip local shares in bkg scan and occ files:scan ( #26590 )
...
Local shares should only be scanned when doing it for the owner to
avoid repeatedly rescanning the same shared storage over and over again
for every recipient.
2017-01-10 16:11:45 +01:00
Robin Appelman
5774d3e82c
replace close:// streamwrapper with CallBackWrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-06 15:33:32 +01:00
Roeland Jago Douma
73fcb69cad
Merge pull request #2934 from nextcloud/quota-stream-non-global
...
remove the need to register the quota streamwrapper globally
2017-01-06 15:25:20 +01:00
Vincent Petry
6d4abdab8f
Fix DAV stat cache to properly cache 404
...
404 errors were not properly cached due to catching the wrong
exception. Now catching ClientHttpException and checking the error
code. In case of 404, adjust the stat cache accordingly.
2017-01-05 09:39:07 +01:00
Robin Appelman
72a3ea6073
log a warning when trying to use a non basic fopen mode
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-05 08:49:04 +01:00
Robin Appelman
bca91f2216
remove static:// stream wrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-04 15:57:02 +01:00
Robin Appelman
968de70bc5
remove the need to register the quota streamwrapper globally
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-04 15:15:47 +01:00
Robin Appelman
5b09565594
remove no longer used fakedir stream wrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-03 17:06:03 +01:00
Vincent Petry
4744dce4df
Nuke the legacy storage fallback from orbit
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:49:46 +01:00
Robin Appelman
14a561ddad
always use numeric storage id in cacheentry
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-13 12:53:38 +01:00
Robin Appelman
86473306f3
fix cacheentry return wrong storage id
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-13 12:50:17 +01:00
Robin Appelman
6f46a8bd5b
also compare storage ids when checking for changed mounts
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-13 12:11:10 +01:00
Morris Jobke
1253d1008a
Merge pull request #2411 from nextcloud/fix-encryption-home-storage
...
check if the file should really be encrypted before we update the file cache
2016-12-05 15:38:12 +01:00
Lukas Reschke
1131338562
Merge pull request #2486 from nextcloud/shared-storage-mask
...
apply permissions mask for shared storage
2016-12-02 23:39:48 +01:00
Robin Appelman
02ee4f958c
apply permissions mask for shared storage
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 17:59:02 +01:00
Robin Appelman
efbe26f9c3
only update the cache if the storage operation succeeds
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 16:20:49 +01:00
Lukas Reschke
b7f866988e
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:57:12 +01:00
Bjoern Schiessle
0f8fe77b3a
check if the file should really be encrypted before we update the file cache
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-29 20:34:45 +01:00
Robin Appelman
ce2f9493a7
filter out oc_mounts results from non existing users
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-24 11:44:18 +01:00
Joas Schilling
558f169671
Move the validation into one place only
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-21 09:23:37 +01:00
Joas Schilling
4652d203e3
Make sure we don't scan files that can not be accessed
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-21 09:23:32 +01:00
Lukas Reschke
cc500c2810
Merge pull request #2199 from nextcloud/readfile-close-handle
...
close the file handle after readfile
2016-11-18 14:58:03 +01:00
Robin Appelman
8b9ad46ba3
Merge pull request #768 from nextcloud/s3-objectstore
...
Add S3 objectstore backend
2016-11-18 14:55:07 +01:00
Robin Appelman
89d37575a3
close the file handle after readfile
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-18 12:19:49 +01:00
Robin Appelman
2f03fcab4a
let the share backend get the node cacheentry to save queries
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-17 18:48:38 +01:00
Robin Appelman
14cdeafc3e
make source cache injectable in cache wrappers
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-17 18:48:38 +01:00
Morris Jobke
02bfd91553
Merge pull request #2176 from nextcloud/share-cache-root-info
...
reuse the known rootinfo in the shared cache when possible
2016-11-17 18:47:39 +01:00
Morris Jobke
54ca411ff0
Merge pull request #2167 from nextcloud/mountmanager-lockdown
...
ensure we setup the mount manager when in lockdown
2016-11-17 16:56:55 +01:00
Robin Appelman
30e7c27d86
reuse the known rootinfo in the shared cache when possible
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-17 14:59:31 +01:00
Morris Jobke
b373f52fa8
only use one kind of hack for the storage wrappers of the sharing code
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-16 19:04:47 +01:00
Vincent Petry
e7b1196dd6
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-16 19:04:42 +01:00
Robin Appelman
a7c0d99705
ensure we setup the mount manager when in lockdown
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 17:24:37 +01:00
Robin Appelman
3ab160dd5a
fopen s3 objects directly to work around unexplainable guzzle bug
...
For some reason when a text file started with a valid hex character ([0-9a-f]) it would eat the text untill the first newline
The new code does basically the same thing as guzzle/s3-sdk did only without wrapping everything in a guzzle stream
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:37 +01:00
Robin Appelman
0ee958595e
Improve isMounted to handle primary storage object store
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:36 +01:00
Robin Appelman
eefd059716
add amazon s3 objectstore backend
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:36 +01:00
Robin Appelman
64e896cc0d
split testing of objectstoragestorage and objectstore implementations
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:36 +01:00
Robin Appelman
0a246f9852
split off s3 connection logic
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:36 +01:00
Robin Appelman
b56f2c9ed0
basic lockdown logic
...
Signed-off-by: Robin Appelman <icewind@owncloud.com>
2016-11-16 15:24:23 +01:00
Roeland Jago Douma
b7e13b43fb
Merge pull request #2114 from nextcloud/downstream-26498
...
make object prefix configurable
2016-11-14 17:07:00 +01:00
Jörn Friedrich Dreyer
4a9361905d
make object prefix configurable
2016-11-14 15:10:56 +01:00
Thomas Müller
506ccdbd8d
Introduce an event for first time login based on the last login time stamp
...
Use firstLogin event to trigger creation of default calendar and default address book
Delay login of admin user after setup so that firstLogin event can properly be processed for the admin
Fixing tests ...
Skeleton files are not copied over -> only 3 cache entries are remaining
Use updateLastLoginTimestamp to properly setup lastLogin value for a test user
2016-11-14 14:50:10 +01:00
Robin Appelman
cbcdf69dc2
only query substorages to calculate the final mtime/size/etag lazily
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-10 13:59:22 +01:00
Lukas Reschke
a9547a2fd7
Merge pull request #2015 from nextcloud/swift-bucket
...
allow using 'bucket' to set the swift container
2016-11-04 21:46:59 +01:00
Morris Jobke
f42d5b6e56
Merge pull request #2007 from nextcloud/downstream-26411
...
[oc] Fix initMountPoints to set usersSetup earlier
2016-11-04 15:03:52 +01:00
Robin Appelman
b72e5a2e4e
allow using 'bucket' to set the swift container
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-04 14:15:18 +01:00
Vincent Petry
237dab675e
Fix initMountPoints to set usersSetup earlier
...
This is needed because in some cases like LDAP, the user manager itself
might trigger avatar updates which would internally also call
initMountPoints with the same user. This could cause the same user to
be setup twice, and in some sharing situations could cause recursive
deduplication of shares by adding "(2)" every time.
2016-11-03 20:45:40 +01:00
Robin Appelman
7be62d083e
explicitly cast mtime to int
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-03 14:36:46 +01:00
Lukas Reschke
68cebef64c
DI for root.php
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 23:16:51 +01:00
Morris Jobke
8653d14862
Do not expose user data in exceptions & fix typo
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-02 22:21:47 +01:00
Vincent Petry
f737426eca
Add using casing check/fix for initMountPoints
2016-11-02 22:21:46 +01:00
Robin Appelman
049bcae29e
Allow setting a maximun number of buckets for multibucket
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-02 21:31:24 +01:00
Morris Jobke
27ba46c40e
Merge pull request #1890 from nextcloud/downstream-25428
...
fixing php 32 bit (arm) filemtime on large file issue (#18971 ) (#25428 )
2016-10-25 14:44:27 +02:00
Lukas Reschke
459477e2c3
Move function to LargeFileHelper
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-25 12:00:57 +02:00
Boris Rybalkin
cfc0d9249b
fixing php 32 bit (arm) filemtime on large file issue ( #18971 ) ( #25428 )
...
* fixing php 32 bit (arm) filemtime on large file issue (#18971 )
* cast to int
2016-10-25 11:43:17 +02:00
Lukas Reschke
df3444493b
Remove not existent function call
...
- Removes a not existent function call
- Removes a fallback for Windows
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-25 11:37:16 +02:00
Roeland Jago Douma
e73a11d106
Fix permision mask
...
If we move a file from the temp part file to the original file we don't
need update permissions.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02:00
Morris Jobke
169faf8c32
Remove sensible information from exception message
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-24 11:42:04 +02:00
Olivier Mehani
19ad058d06
Add message to NotSquareException thrown from Avatar
...
This prevents cryptic messages such as the following, from `user_ldap`:
Could not set avatar for uid=user,ou=People,dc=example,dc=net, because:
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Add message to NotPermittedException thrown from Files\Nodes\Folder
Ditto.
Don't use translation macros here as this seems to be pretty low-level
errors that generally get caught and prettified, and I don't want to
unduly clog down the lower layers.
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
fixup! Add message to NotPermittedException thrown from Files\Nodes\Folder
2016-10-24 11:27:27 +02:00
Roeland Jago Douma
ab91fa2660
Merge pull request #1820 from nextcloud/4byte-filenames
...
Allow 4byte unicode filenames on supported platforms
2016-10-24 10:38:25 +02:00
Morris Jobke
2799b0a821
Merge pull request #1835 from nextcloud/downstream-24948
...
Move OC\Files\Storage\Shared to the right namespace
2016-10-20 23:48:15 +02:00
Vincent Petry
9e9fef46d9
Get rid of very old oc:// stream wrapper ( #26381 )
2016-10-20 20:46:30 +02:00
Joas Schilling
246bb9f33d
Move OC\Files\Storage\Shared to the right namespace
2016-10-20 20:27:44 +02:00
Robin Appelman
3a8e75a814
Allow 4byte unicode filenames on supported platforms
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-20 14:26:09 +02:00
Morris Jobke
deb59d3d48
Merge pull request #1722 from nextcloud/hide-storage-warnings
...
hide storage wrapper warning for the readonly storage
2016-10-18 16:15:52 +02:00
Morris Jobke
4d2835802f
hide storage wrapper warning for the readonly storage
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-13 14:37:31 +02:00
Robin Appelman
1484d01ff6
explicitly cast to int
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:39 +02:00
Robin Appelman
0d842e0550
optimize Folder::getById to use less queries
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:28 +02:00
Roeland Jago Douma
6807cb684f
avatar to appdata
...
* Fix AvatarTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:16 +02:00
Roeland Jago Douma
ac38a3a654
Add Tests
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:16 +02:00
Roeland Jago Douma
5d8b941fea
Initial AppData
...
* Introduce simpleFS
* Introduce IAppData
* Introduce AppData Factory to get your AppData folder
* Update FileDisplayResponse
* AppData implements a ISimpleRoot but lazy. So only if an apps starts
to access data will stuff get initialized
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:14 +02:00
Lukas Reschke
c4d263199c
Merge pull request #1521 from nextcloud/fix-mimetypedetect-hiddenfolder
...
Fix mimetype detection inside hidden folders (#26138 )
2016-09-27 18:52:48 +02:00
Vincent Petry
9b4de310bd
Fix mimetype detection inside hidden folders ( #26138 )
...
Downstreaming of https://github.com/owncloud/core/pull/26138
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 11:31:03 +02:00
Vincent Petry
1f21a132c7
Only use realpath for real directories ( #26058 )
...
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/26058
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 11:21:47 +02:00
Semih Serhat Karakaya
cfc1c7cbd2
Update CachedMountInfo for user home storage
...
In getMountPointNode function rootId is not inside of the userFolder for home storage. We was searching '/user' folder in '/user/files' folder. So, it was return NULL. I moved searching part to parent folder. It solves everything. Also, obviously other storage types not affect then this change.
Related owncloud commit :
https://github.com/owncloud/core/pull/26017
2016-09-09 18:07:21 +03:00
Morris Jobke
5ac26d12f0
Merge pull request #1247 from nextcloud/storage-id-global-cache
...
more efficient querying of numeric storage ids
2016-09-08 21:09:14 +02:00
Robin Appelman
e8e950a4d2
more efficient querying of numeric storage ids
2016-09-07 17:22:40 +02:00
Joas Schilling
24d90a4bb1
Correctly remove the charset from finfo mimetype
2016-09-05 09:48:22 +02:00
Vincent Petry
669b0bc2ae
Prevent error with orphaned shares when updating user mount cache
2016-08-30 19:49:23 +02:00
Jörn Friedrich Dreyer
d5518735c9
always return numeric storage id as int, also check type equality in test asserts
2016-08-29 14:20:51 +02:00
Lukas Reschke
4d85ffc27c
Merge pull request #1054 from nextcloud/less-cache-hits
...
Reduce the number of cache operations for dav operations
2016-08-27 22:44:29 +02:00
Roeland Jago Douma
f805aff67c
Always use the LazyRoot
2016-08-26 12:13:34 +02:00
Robin Appelman
fb88d66857
optimize getUserFolder for the common case
2016-08-25 17:22:25 +02:00
Robin Appelman
2693ae870e
cache user folders
2016-08-25 17:22:25 +02:00
Robin Appelman
b2d365734a
cache root id in mountpoint
2016-08-25 17:22:25 +02:00
Robin Appelman
a0c2342c20
prevent infinite recursion while getting storage from mount
2016-08-23 14:52:18 +02:00
Robin Appelman
e316a7ade7
Allow jail wrappers to lazily initialize the source storage
2016-08-22 12:26:27 +02:00
Robin Appelman
5e44a2d868
Allow storage wrappers to lazily initialize the source storage
2016-08-22 12:23:55 +02:00