This makes sure that a possible ForbiddenException is properly passed
through the storage as a ForbiddenException and can be catched when
trying to fetch the quota info of a parent folder
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Fixes parent folder that becomes inaccessible when it contains a
non-existing / broken entry because the quota check made the PROPFIND
on parent fail altogether.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
- it is being used on frontend by users
- user and big instances benefit from quicker results and less load
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
The circles app depends on a valid userId. A public shared calender might be viewed by guests without a user session. For such requests the principal is null.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
instead of using the sabredav fallback (which does a read+write stream copy)
this greatly speeds up dav copies
Signed-off-by: Robin Appelman <robin@icewind.nl>
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>
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>
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>
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>
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>