Joas Schilling
aefbf4c01d
Fix numeric folders throwing on markDirty
...
TypeError: strpos() expects parameter 1 to be string, int given
The problem is that in cacheNode() we strip of any slashes, so
a folder "0/" will be trimmed to "0" and be used as an array key.
Since PHP automatically casts numeric array keys to integers,
you afterwards get $nodePath as int(0). Since it's now a number,
the strpos() function does not accept it anymore. Simply casting
$nodePath to a string again in the foreach solves the issue
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-25 13:14:49 +00:00
Morris Jobke
c1ff011990
Merge pull request #22799 from nextcloud/bugfix/noid/dont-log-microsoft-webdav-client-trying-to-tag
...
Don't log Microsoft WebDAV client trying to tag things
2020-09-14 14:43:54 +02:00
Joas Schilling
2dbd6424f7
Don't log Microsoft WebDAV client trying to tag things
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-11 11:52:05 +02:00
Georg Ehrke
b5204a78cc
Mitigate encoding issue with user principal uri
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-09-10 16:00:03 +02:00
Julius Härtl
1dddf6adc7
Properly catch exception from writing to stream when copying a file
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-10 09:03:53 +02:00
Christoph Wurst
1f7f93a695
Update license headers for Nextcloud 20 (again)
...
There are still lots of outdated headers, so time for another round of
updates.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +02:00
Julius Härtl
4cf29e598d
Do not keep the part file if the forbidden exception has retry set to false
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-03 11:00:24 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke
fedf9c69d9
Use matching parameter names form interfaces and implementations
...
Found by Psalm 3.14.1
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 18:16:35 +02:00
Daniel Kesselberg
6f8147b18f
Fix some MissingDocblockType or InvalidDocblock warnings.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-14 15:10:48 +02:00
Roeland Jago Douma
68f1283691
Do not log RequestedRangeNotSatisfiable exceptions in DAV
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-14 20:46:33 +02:00
Morris Jobke
e878c0a054
Merge pull request #21074 from jvsalo/shared-lock-multi-release
...
Fix releasing a shared lock multiple times
2020-07-06 14:06:41 +02:00
Joas Schilling
89ed2c37bf
Update share type constant usage
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +02:00
Roeland Jago Douma
7b6b946470
Allow for compression of the PROPFIND responses
...
For now it just gzip and only for propfind (the 99% case). Already saves
a bunch since the propfinds compress so nicely.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-06 15:55:04 +02:00
Jaakko Salo
6886b46ee2
In LockPlugin, only release a lock if it was acquired
...
When uploading new files, getNodeForPath() will not succeed
yet so the lock cannot be acquired.
In that case, don't try to unlock it either.
Signed-off-by: Jaakko Salo <jaakkos@gmail.com>
2020-05-24 20:26:38 +03:00
Morris Jobke
ecbc009e2f
Translate the maintenance mode message in webdav
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-06 18:11:54 +02:00
Roeland Jago Douma
b8b53a2d9a
Merge pull request #19436 from nextcloud/bugfix/noid/dav-quota-calculation
...
Do not include mountpoints when calculating quota usage on WebDAV
2020-04-30 09:13:19 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Julius Härtl
902d12555e
Do not include mountpoints when calculating quota usage on WebDAV
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-24 18:15:43 +02:00
Julius Härtl
d7161b4eee
Only catch anonymous OPTIONS for Office
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-24 14:46:07 +02:00
Roeland Jago Douma
8c5bb22bc1
Merge pull request #20576 from nextcloud/fix/dav/oc-etag
...
Make sure that OC-ETag is set again
2020-04-22 22:21:22 +02:00
Georg Ehrke
effcd58e14
Fix usages of afterMethod -> afterMethod:*
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-04-21 10:19:06 +02:00
Roeland Jago Douma
4ee56689a8
Make sure that OC-ETag is set again
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-21 10:14:31 +02:00
Arthur Schiwon
73271aa086
DAV's exception logger should deal with any Throwable
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-04-15 15:28:37 +02:00
Robin Appelman
57403c7020
dont set headers for cli
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-13 12:57:29 +02:00
Robin Appelman
c2677682c4
Return hashes of uploaded content for dav uploads
...
hashes are set in "X-Hash-MD5", "X-Hash-SHA1" and "X-Hash-SHA256" headers.
these headers are set for file uploads and the MOVE request at the end of a multipart upload.
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-13 12:57:27 +02:00
Christoph Wurst
734c62bee0
Format code according to PSR2
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:56:50 +02:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst
42625a46be
Remove spaces after method or function call
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +02:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst
85e369cddb
Fix multiline comments
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Roeland Jago Douma
2200cc8562
Merge pull request #19325 from nextcloud/dependachristoph/composer/sabre-4.0
...
Update Sabre (and friends) to 4.0
2020-03-30 09:34:25 +02:00
Christoph Wurst
463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
...
Remove unused imports
2020-03-27 17:14:08 +01:00
Georg Ehrke
52ba75f644
Sabre/DAV 4.0: beforeMethod is now beforeMethod:*
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-03-27 12:53:44 +01:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst
74936c49ea
Remove unused imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst
23eb0462e5
Use lowercase true, false and null constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 21:53:04 +01:00
Julius Härtl
0fa897fcfc
Limit enumeration in principal search
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-20 10:43:56 +01:00
Robin Appelman
ce398cf7bd
merge the two almost identical custom property backends
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-03-18 13:41:04 +01:00
Robin Appelman
fab22ac14c
pass the existing locks info when making locked exception with absolute paths
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-03-02 19:29:44 +01:00
Julius Härtl
8fba05db96
Check for empty authorization headers for office requests and allow anonymous option on the whole tree
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-04 15:35:23 +01:00
Christoph Wurst
1b46621cd3
Update license headers for 18
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Roeland Jago Douma
8d7baaff74
Merge pull request #18061 from nextcloud/bugfix/noid/dav-plugin-old
...
Load apps dav plugins on the old webdav route
2019-12-16 13:38:38 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00