Commit Graph

19721 Commits (f4307ef4b16ffa1ea5a9e4697b57be36660a7953)

Author SHA1 Message Date
Vincent Petry 93fb33d863
Update lib/private/Files/Storage/Wrapper/Availability.php add void
Signed-off-by: Vincent Petry <vincent@nextcloud.com>

Co-authored-by: Carl Schwan <carl@carlschwan.eu>
2021-11-05 10:28:41 +07:00
Vincent Petry db29fd29ee
Return false in hasUpdated when storage is not available
Technically, saying that a storage has no updates when it's not
available is correct.

This makes it possible to retrieve the cache entry for the mount point
and also to list and remove unavailable federated shares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-05 09:48:52 +07:00
Nextcloud bot 7cc92fff7a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-05 02:22:55 +07:00
John Molakvoæ d6152bf98d
Fix psalm
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-11-04 10:24:13 +07:00
John Molakvoæ 7bf9382575
Merge pull request #29482 from nextcloud/feat/revamp-profile-visibility-section 2021-11-04 08:32:22 +07:00
Christoph Wurst 18e6288c89
Merge pull request #29533 from nextcloud/enhancement/get-calendars-for-principal-api
Add IManager::getCalendarsForPrincipal API
2021-11-04 07:33:49 +07:00
Christopher Ng 50a6612c1f Refine profile backend for frontend visibility requirements
- Provide metadata
  - Dynamic displayId
  - Add appId
- Filter out unused parameter config properties from the existing profile config

Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-11-04 00:17:29 +07:00
Christopher Ng eb6217f551 Better function descriptions
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-11-03 23:15:56 +07:00
Christopher Ng ee1c6eefb4 Add additional check on action registrations
- Minor refactor

Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-11-03 23:15:56 +07:00
Christoph Wurst b453fea4da
Merge pull request #29525 from nextcloud/bugfix/noid/allow-to-inject-by-public-interface
Allow to inject the trusted domain helper by public interface
2021-11-03 14:16:12 +07:00
Christoph Wurst 3ef6a099a3
Add IManager::getCalendarsForPrincipal API
The Calendar app needs to access calendars of a given principal in the
back-end. The new calendar providers were not accessible for apps before
this patch. Now they can access the ICalendar objects on demand.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-03 12:19:47 +07:00
Joas Schilling de26160778
Allow to inject the trusted domain helper by public interface
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-03 11:06:19 +07:00
Nextcloud bot 5705af29a5
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-03 02:23:35 +07:00
Côme Chilliet f90176efce
Merge pull request #29479 from nextcloud/fix/images-php-8.0
Fix image handling for PHP 8.0
2021-11-02 10:57:08 +07:00
Nextcloud bot b15b41d731
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-02 02:22:15 +07:00
John Molakvoæ 44c06a9641
Merge pull request #29502 from nextcloud/revert-27378-dav-recalc-checksum 2021-11-01 13:50:52 +07:00
Robin Appelman 118c647f61
properly handle cases where cache wrappers block access
`CacheWrapper::formatCacheEntry` can return false for files that should be filtered out

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-11-01 11:48:01 +07:00
John Molakvoæ 63d3931e80
Merge pull request #29281 from vijfhoek/master 2021-11-01 11:29:37 +07:00
John Molakvoæ d6a26b2536
Revert "add dav plugin to trigger recalculating of checksums" 2021-11-01 11:26:17 +07:00
John Molakvoæ e1bf5c1cd3
Merge pull request #27378 from nextcloud/dav-recalc-checksum 2021-11-01 11:25:21 +07:00
Christoph Wurst b193f854d1
Register missing DAV app calendar provider
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-28 18:33:13 +07:00
Côme Chilliet 3631789651
Fix resource usages in OC_Image
This makes sure using resource or GdImage (PHP>=8) behaves the same.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-28 17:48:43 +07:00
Carl Schwan df4e6bab69
Merge pull request #29115 from nextcloud/work/carl/correct-permissions-when-copying
Fix permissions when copying from ObjectStorage
2021-10-28 14:38:20 +07:00
Carl Schwan bfa60aaf27
Fix permissions when copying from ObjectStorage
Make sure that when a user copy a file from a directory they don't have
all permissions to a directory where they have more permissions, the
permissions are correctly set to the one from the parent taget folder.

This was caused by the ObjectStoreStorage::copyFromStorage using
the jailed storage and cache entry instead of the unjailed one like other
storages (the local one).
Steps to reproduce

+ Use object storage
+ Create a groupfolder with one group having full permission and another one
  who can just read files.
+ With an user who is in the second group, copy a file from the groupfolder to
  the home folder of this user.
+ The file in the home folder of the user will be read only and can't be deleted
  even though it is in their home folder and they are the owner. In oc_filecache,
  the permissions stored for this file are 1 (READ)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-28 13:29:50 +07:00
Joas Schilling 74cfe7348d
Merge pull request #29444 from nextcloud/bugfix/noid/public-api-for-trusted-domain-helpers
Add an OCP for trusted domain helper
2021-10-28 11:45:03 +07:00
Joas Schilling c42f5bc5f6
Add an OCP for trusted domain helper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-28 10:24:16 +07:00
John Molakvoæ 3f8ca991fc
Merge pull request #29453 from nextcloud/bugfix/noid/improve-wording 2021-10-27 10:48:21 +07:00
Joas Schilling 9a18bd7abf
Improve wording
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-27 10:12:30 +07:00
Christopher Ng 7b1cdf1fa6 Prevent unnecesary profile action registrations
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-10-26 08:59:28 +07:00
John Molakvoæ 1b366a033a
Merge pull request #29435 from nextcloud/explicitly-name-profile-link-action 2021-10-26 10:51:11 +07:00
Nextcloud bot b691f30af1
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-26 02:22:53 +07:00
Christopher Ng 9f8eae3f50 Use more explicit naming for profile link action
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-10-25 22:20:19 +07:00
John Molakvoæ d231d2618d
Merge pull request #29425 from nextcloud/revert-28138-zorn-v-patch-2 2021-10-25 09:25:03 +07:00
John Molakvoæ 8ea91b4364
Merge pull request #26531 from J0WI/refactor-preview-exec 2021-10-25 09:23:01 +07:00
Joas Schilling 06611e4780
Revert "Fix "never catch" catches in OC_App" 2021-10-25 08:41:56 +07:00
Nextcloud bot dc9b05256c
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-25 02:22:23 +07:00
J0WI 047cab8dd2 Use findBinaryPath for previews
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-10-23 23:15:42 +07:00
alanmeeson 16f70e8647 Add type hint to fread_block $blockSize param & apply cs:fix.
Signed-off-by: alanmeeson <alan@carefullycalculated.co.uk>
2021-10-23 15:11:23 +07:00
Alan Meeson 44c332a46e Fix truncation of files upon read when using object store and encryption.
When using and object store as primary storage and using the default
encryption module at the same time,  any encrypted file would be truncated
when read, and a text error message added to the end.

This was caused by a combination of the reliance of the read functions on
on knowing the unencrypted file size,  and a bug in the function which
calculated the unencrypted file size for a given file.

In order to calculate the unencrypted file size,  the function would first
skip the header block, then use fseek to skip to the last encrypted block
in the file.  Because there was a corresponence between the encrypted and
unencrypted blocks, this would also be the last encrypted block.  It would
then read the final block and decrypt it to get the unencrypted length of
the last block.  With that, the number of blocks, and the unencrypted block
size, it could calculate the unencrypted file size.

The trouble was that when using an object store, an fread call doesn't
always get you the number of bytes you asked for, even if they are
available.  To resolve this I adapted the stream_read_block function from
lib/private/Files/Streams/Encryption.php to work here.  This function
wraps the fread call in a loop and repeats until it has the entire set of
bytes that were requested,  or there are no more to get.

This fixes the imediate bug, and should (with luck) allow people to get
their encrypted files out of Nextcloud now.  (The problem was purely on
the decryption side).  In the future it would be nice to do some
refactoring here.

I have tested this with image files ranging from 1kb to 10mb using
Nextcloud version 22.1.0 (the nextcloud:22.1-apache docker image), with
sqlite and a Linode object store as the primary storage.

Signed-off-by: Alan Meeson <alan@carefullycalculated.co.uk>
2021-10-23 15:11:23 +07:00
John Molakvoæ f4e4a85fcf
Merge pull request #27440 from nextcloud/is-file-handle 2021-10-23 11:18:52 +07:00
John Molakvoæ c5e9f379bd
Merge pull request #28138 from nextcloud/zorn-v-patch-2 2021-10-23 11:18:07 +07:00
John Molakvoæ a06001e085
Merge pull request #29363 from nextcloud/fair-use-push 2021-10-23 10:53:22 +07:00
John Molakvoæ 7e117da435
Merge pull request #29397 from nextcloud/fix/noid/profile-missing-def-values 2021-10-23 10:52:44 +07:00
Nextcloud bot 7c2d8d3e82
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-23 02:22:31 +07:00
Joas Schilling b578a1e8b5
Fair use of push notifications
We want to keep offering our push notification service for free, but large
users overload our infrastructure. For this reason we have to rate-limit the
use of push notifications. If you need this feature, consider setting up your
own push server or using Nextcloud Enterprise.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-23 00:54:50 +07:00
Arthur Schiwon e26d6f080b
fix populating account array with missing default values
- both $userData and $defaultUserData have numeric indices
- each element contains at least the name and other fields
- appending the missing data array is sufficient

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-10-22 23:05:43 +07:00
Daniel 1895a6dc57
Merge pull request #29378 from nextcloud/fix/unhelpful-route-name-error
Make the route name error more helpful
2021-10-22 22:33:35 +07:00
Julius Härtl 6b099ecfe5
Merge pull request #25392 from nextcloud/imountpoint-ocp-storage 2021-10-22 20:14:22 +07:00
John Molakvoæ 2be0eda47c
Merge pull request #29220 from nextcloud/s3-external-list 2021-10-22 12:06:05 +07:00
John Molakvoæ e673ec0b87
Merge branch 'master' into imountpoint-ocp-storage 2021-10-22 11:47:37 +07:00