Commit Graph

433 Commits

Author SHA1 Message Date
Robin Appelman 47fd3499a3
Fix listing s3 objects when using google cloud aws compatibility
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-06-11 17:10:57 +02:00
Roeland Jago Douma 49145a78e9
Make sure initial files can be properly created
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-07 12:07:37 +02:00
Robin Appelman ac26175a17
add azure unit tests with azurite
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-06-04 16:18:03 +02:00
Robin Appelman 60b7cbc0f0
add azure object storage backend
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-04 10:57:52 +02:00
Morris Jobke 6b6d522969
Merge pull request #9395 from nextcloud/scanner-error-lock-cleanup
cleanup locks in scanner on error
2018-05-23 20:05:01 +02:00
Roeland Jago Douma 575dc29c27
Make Appdata static
* Add fileid for simpleroot folders (only internal)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-14 13:25:54 +02:00
Morris Jobke 7639f680a2
Merge pull request #9397 from nextcloud/log-fileinfo-not-found
Debug log file not found when getting fileinfo
2018-05-07 16:43:38 +02:00
Morris Jobke 7f5567e758
Merge pull request #9388 from nextcloud/log-lock-state-on-conflict
Log lock state on conflict
2018-05-07 16:42:26 +02:00
Morris Jobke 5484260569
Merge pull request #9372 from nextcloud/bugfix/4577
Do not allow folder creation with quota of 0
2018-05-07 10:11:44 +02:00
Morris Jobke 0da6f6b356
Merge pull request #9371 from nextcloud/bugfix/7444
Cache is not part of the quota
2018-05-07 10:11:04 +02:00
Robin Appelman e3de7ec867
Debug log file not found when getting fileinfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-05-04 18:48:12 +02:00
Robin Appelman 63caf331e5
cleanup locks in scanner on error
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-05-04 18:05:46 +02:00
Morris Jobke fb296342b9
Merge pull request #9387 from nextcloud/getcachentry-lock
remove unneeded locks in getCacheEntry
2018-05-04 14:57:09 +02:00
Robin Appelman 94c15efad0
always log locking errors
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-05-04 13:30:43 +02:00
Robin Appelman 734aec1522
remove unneeded locks in getCacheEntry
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-05-04 12:51:41 +02:00
Morris Jobke 2780bb0b2b
Merge pull request #9364 from nextcloud/log-invalid-storage
Log mount and storage issues in getFileInfo
2018-05-04 12:01:33 +02:00
Roeland Jago Douma 0ff83f7230
Do not allow folder creation with quota of 0
Fixes #4577

Users with a quota of 0 are a special case. Since they can't (ever)
create files on their own storage. Therefor it makes no real that they
can create folders (and possible share those etc).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-03 11:31:23 +02:00
Roeland Jago Douma f2d05120b4
Cache is not part of the quota
Fixes #7444

Since the quota is calculated on the files. We should allow apps etc to
store temp stuff in the <user>/cache

Else users can't upload avatars for example.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 21:46:28 +02:00
Robin Appelman d71783fb93
Log mount and storage issues in getFileInfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-05-02 15:11:59 +02:00
Robin Appelman 57ba18f47f
Use better way to determine stream type in encryption stream wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-05-01 15:06:21 +02:00
Morris Jobke 7306d30708
Merge pull request #9321 from nextcloud/bugfix/noid/return_root_folder_when_at_root
Actually return the root folder when traversing up the tree
2018-04-27 13:59:29 +02:00
Roeland Jago Douma a0e038f912
generateTokenFromCache is only valid for V3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-26 20:51:05 +02:00
Roeland Jago Douma 7318882357
json_decode an associative array for the swift cached token
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-26 20:47:47 +02:00
Roeland Jago Douma 235e3480e6
Actually return the root folder when traversing up the tree
If you now keep calling $node->getParent() you will at some point get
the RootFolder back. This is a nice termination check and will prevent
endless loops if an exit condition is slightly off.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-26 20:04:19 +02:00
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
Roeland Jago Douma 1ceb081c9b
Merge pull request #9280 from nextcloud/bugfix/noid/swift-v3-scope
Swift v3 requires setting a scope
2018-04-24 09:49:27 +02:00
Roeland Jago Douma ba71918ad2
Swift v3 requires setting a scope
Unscoped auth is not guaranteed to return a catalog. So require the
scope to be set properly.

See https://developer.openstack.org/api-ref/identity/v3/index.html#password-authentication-with-unscoped-authorization

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-23 19:34:09 +02:00
Morris Jobke 431ccb6386
Fix undefined variable - found by phan
Added in https://github.com/nextcloud/server/pull/8314/files#diff-a55c10804586cd797b7f3f16556c1457R157

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-23 11:34:41 +02:00
Morris Jobke 67dcff7a1f
Fix undefined variable - found by Phan
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-23 11:30:22 +02:00
Morris Jobke 2f068bc9d1
Add more logging for the object storage during creation of the buckets
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-05 17:26:09 +02:00
Roeland Jago Douma 73e6eea57e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:50:54 +02:00
Roeland Jago Douma 37233471b6
Add pathcache
* If we find the mountpoint for a path cache it
* If we modify the mount points empty the pathCache

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:56 +02:00
Roeland Jago Douma 6868da9958
Make normalized cache path larger
On larger instances with a large number of shares this can make a real
impact as the default 512 entries are easily filled.

Making this contain max 2048 entries has basically no effect on smaller
installations (as they probably never hit the 512 now). But makes sure
we don't evict entries in the larger case.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:52 +02:00
Roeland Jago Douma dc222aa3a5
Comparing stringlength is cheaper than strpos
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +02:00
Roeland Jago Douma e48d4c4aad
Cache the $foundMountPointLength
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +02:00
Roeland Jago Douma 003c624596
Inspections
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +02:00
Roeland Jago Douma 7f1141f7e9
Make the MountManager strict
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +02:00
Björn Schießle c3900c9d0d
Merge pull request #9018 from nextcloud/fix-copy-encrypted-files
reset encryptionVersion to '1' if a file was stream copied
2018-04-03 18:24:27 +02:00
Bjoern Schiessle a0923d9ffb
reset encryptionVersion to '1' if a file was stream copied, because this means that we basically write the file from scratch
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-04-03 18:01:23 +02:00
Roeland Jago Douma 53447ae2b2
Throw an exception if file_put_contents fails
* This will help with AppData hardening etc
* Introduced a GenericFileException for if nothing else is appropiate
  - Maybe the other File exceptions should base on this?

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-27 16:23:06 +02:00
Roeland Jago Douma 4e1161d254
Fix proper permissions for multiple file access
Fixes #8890

In case you have access to a file via multiple ways, for example:
1. the file is shared with you with permission read only
2. the folder containing the file is shared with your read/write

Requesting the getById function on the userFolder would give back two
entries but both with the same permissions. Depending on the node you
picked this is not right.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-22 12:06:41 +01:00
Roeland Jago Douma 47a3008141
Remove \OCP\Files::tmpFile
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-19 10:52:35 +01:00
Morris Jobke 63bc633d89
Merge pull request #8857 from nextcloud/swift-verify-cached-token
verify cached swift token
2018-03-19 10:10:04 +01:00
Robin Appelman 41954d2903
verify cached swift token
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-03-16 15:20:16 +01:00
Roeland Jago Douma fa886ef4eb
Merge pull request #8830 from nextcloud/node_emit_read
Emit read for nodes
2018-03-15 14:04:14 +01:00
Roeland Jago Douma d6b326650b
Emit read for nodes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-15 11:18:39 +01:00
Roeland Jago Douma d3e7996e80
Fix bucket and container usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-14 13:57:14 +01:00
Roeland Jago Douma 4e8d5504d2
Properly cache swift v3 token
The V3 token has an export function. Without this the token is
effectively never cached.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-12 20:53:50 +01:00
Roeland Jago Douma d05469959e
Merge pull request #8715 from nextcloud/objectstore-no-part-files
disable part files for object stores
2018-03-08 20:52:16 +01:00
Robin Appelman fc35352122
disable part files for object stores
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-03-07 13:33:35 +01:00